Skip to content

Commit

Permalink
Prevent players from ignoring themselves
Browse files Browse the repository at this point in the history
  • Loading branch information
JRoy committed Aug 22, 2023
1 parent e3e52db commit 5ab1f60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ protected void run(final Server server, final User user, final String commandLab
} 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()));
Expand Down
1 change: 1 addition & 0 deletions Essentials/src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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=\u00a76That won''t solve your problems.
illegalDate=Illegal date format.
infoAfterDeath=\u00a76You died in \u00a7e{0} \u00a76at \u00a7e{1}, {2}, {3}\u00a76.
infoChapter=\u00a76Select chapter\:
Expand Down

0 comments on commit 5ab1f60

Please sign in to comment.