Skip to content

Commit

Permalink
follow rollczi suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
P1otrulla committed Jun 22, 2023
1 parent d358ed8 commit c1721c6
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,12 @@ public AutoMessageCommand(AutoMessageService autoMessageService, NoticeService n
void execute(Player player) {
this.autoMessageService.switchReciving(player.getUniqueId()).then(reciving -> {
if (reciving) {
this.noticeService.create()
.player(player.getUniqueId())
.notice(messages -> messages.autoMessage().enabled())
.send();
this.noticeService.player(player.getUniqueId(), messages -> messages.autoMessage().enabled());

return;
}

this.noticeService.create()
.player(player.getUniqueId())
.notice(messages -> messages.autoMessage().disabled())
.send();
this.noticeService.player(player.getUniqueId(), messages -> messages.autoMessage().disabled());
});
}
}

0 comments on commit c1721c6

Please sign in to comment.