feat: message if already ignoring player.

This commit is contained in:
DaRacci committed 2022-10-10 15:00:45 +11:00
1 parent e163c9e3ef
commit fb5144f121
3 files changed
+9

No files matched your search

@@ -101,6 +101,11 @@ public class IgnoreCommand extends CarbonCommand {
return;
}
if (target.ignoring(target)) {
this.carbonMessages.alreadyIgnored(sender, CarbonPlayer.renderName(target));
return;
}
sender.ignoring(target, true);
this.carbonMessages.nowIgnoring(sender, CarbonPlayer.renderName(target));
})
@@ -187,6 +187,9 @@ public interface CarbonMessages {
* =============================================================
*/
@Message("ignore.already_ignored")
void alreadyIgnored(final Audience audience, final Component target);
@Message("ignore.exempt")
void ignoreExempt(final Audience audience, final Component target);
@@ -59,6 +59,7 @@ error.command.invalid_player=No player found for input '<input>'
error.command.invalid_sender=<red>Invalid command sender. You must be of type <gray><senderType>
error.command.invalid_syntax=<red>Invalid command syntax. Correct command syntax is: <white>/</white><gray><syntax></gray>
error.command.no_permission=<red>I'm sorry, but you do not have permission to perform this command.\nPlease contact the server administrators if you believe that this is in error.
ignore.already_ignored=<red>You are already ignoring <gray><target>
ignore.exempt=<red>You cannot ignore <target>
ignore.invalid_target=<red>No target found
ignore.now_ignoring=<green>You are now ignoring <target>