Prevent players from ignoring themselves (#5488)

Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
This commit is contained in:
Josh Roy 2023-08-24 18:04:37 -04:00 committed by GitHub
parent 42071f4ad4
commit ee1111f6aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -44,6 +44,8 @@ public class Commandignore extends EssentialsCommand {
} else if (user.isIgnoredPlayer(player)) {
user.setIgnoredPlayer(player, false);
user.sendMessage(tl("unignorePlayer", player.getName()));
} else if (user.getUUID().equals(player.getUUID())) {
user.sendMessage(tl("ignoreYourself"));
} else {
user.setIgnoredPlayer(player, true);
user.sendMessage(tl("ignorePlayer", player.getName()));

View File

@ -532,6 +532,7 @@ ignoreCommandUsage1Description=Ignores or unignores the given player
ignoredList=\u00a76Ignored\:\u00a7r {0}
ignoreExempt=\u00a74You may not ignore that player.
ignorePlayer=\u00a76You ignore player\u00a7c {0} \u00a76from now on.
ignoreYourself=\u00a76Ignoring yourself won''t solve your problems.
illegalDate=Illegal date format.
infoAfterDeath=\u00a76You died in \u00a7e{0} \u00a76at \u00a7e{1}, {2}, {3}\u00a76.
infoChapter=\u00a76Select chapter\: