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 | 507c138dc413557c9a26bb6a60670cfb80a562d8 (patch) | |
tree | c18cd869ad0ba29a17427d88bf1b3ebad133a312 /EssentialsChat/src/com/earth2me/essentials/chat | |
parent | 5955210f769d1fb6bdfcdd1c42c0bcca6276a591 (diff) | |
download | Essentials-507c138dc413557c9a26bb6a60670cfb80a562d8.tar Essentials-507c138dc413557c9a26bb6a60670cfb80a562d8.tar.gz Essentials-507c138dc413557c9a26bb6a60670cfb80a562d8.tar.lz Essentials-507c138dc413557c9a26bb6a60670cfb80a562d8.tar.xz Essentials-507c138dc413557c9a26bb6a60670cfb80a562d8.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; } |