diff options
Diffstat (limited to 'EssentialsChat/src/com')
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java index c65eb5a0e..58b094793 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java @@ -63,7 +63,7 @@ public abstract class EssentialsChatPlayer implements Listener case '?': return "question"; //case '@': - //return "admin"; + //return "admin"; default: return ""; } @@ -121,32 +121,34 @@ public abstract class EssentialsChatPlayer implements Listener { String type = _("chatTypeLocal"); final User onlineUser = ess.getUser(onlinePlayer); - if (onlineUser.isIgnoredPlayer(sender.getName()) && !sender.isAuthorized("essentials.chat.ignoreexempt")) + if (onlineUser.isIgnoredPlayer(sender)) { continue; } if (!onlineUser.equals(sender)) { - boolean abort = false; - final Location playerLoc = onlineUser.getLocation(); - if (playerLoc.getWorld() != world) + boolean abort = false; + final Location playerLoc = onlineUser.getLocation(); + if (playerLoc.getWorld() != world) + { + abort = true; + } + final double delta = playerLoc.distanceSquared(loc); + if (delta > chatStore.getRadius()) + { + abort = true; + } + if (abort) + { + if (onlineUser.isAuthorized("essentials.chat.spy")) { - abort = true; + type = type.concat(_("chatTypeSpy")); } - final double delta = playerLoc.distanceSquared(loc); - if (delta > chatStore.getRadius()) + else { - abort = true; + continue; } - if (abort) { - if (onlineUser.isAuthorized("essentials.chat.spy")) - { - type = type.concat(_("chatTypeSpy")); - } - else - { - continue; - } + } } String message = String.format(event.getFormat(), type.concat(sender.getDisplayName()), event.getMessage()); |