diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-04-06 02:36:27 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-04-06 02:36:27 +0100 |
commit | 6504c88bf7cb406acce0dda2c45623bc8be15734 (patch) | |
tree | 8c615234d93644d0c4e26c3c494f2e1c2e299b77 /EssentialsChat/src/com/earth2me/essentials/chat | |
parent | 6a75d6fe86c78d2f5b5b3716291b7b81171b330e (diff) | |
download | Essentials-6504c88bf7cb406acce0dda2c45623bc8be15734.tar Essentials-6504c88bf7cb406acce0dda2c45623bc8be15734.tar.gz Essentials-6504c88bf7cb406acce0dda2c45623bc8be15734.tar.lz Essentials-6504c88bf7cb406acce0dda2c45623bc8be15734.tar.xz Essentials-6504c88bf7cb406acce0dda2c45623bc8be15734.zip |
Chat spy, should show otherworld chat.
Diffstat (limited to 'EssentialsChat/src/com/earth2me/essentials/chat')
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java index ddf928725..6bdab0919 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java @@ -126,20 +126,19 @@ public abstract class EssentialsChatPlayer implements Listener } if (!onlineUser.equals(sender)) { - final Location playerLoc = onlineUser.getLocation(); - if (playerLoc.getWorld() != world) + if (onlineUser.isAuthorized("essentials.chat.spy")) { - continue; + type = type.concat(_("chatTypeSpy")); } - final double delta = playerLoc.distanceSquared(loc); - - if (delta > chatStore.getRadius()) + else { - if (onlineUser.isAuthorized("essentials.chat.spy")) + final Location playerLoc = onlineUser.getLocation(); + if (playerLoc.getWorld() != world) { - type = type.concat(_("chatTypeSpy")); + continue; } - else + final double delta = playerLoc.distanceSquared(loc); + if (delta > chatStore.getRadius()) { continue; } |