summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/Commandnear.java
diff options
context:
space:
mode:
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandnear.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandnear.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnear.java b/Essentials/src/com/earth2me/essentials/commands/Commandnear.java
index 29d30b3e7..a31c220ca 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandnear.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandnear.java
@@ -103,10 +103,9 @@ public class Commandnear extends EssentialsCommand
final long radiusSquared = radius * radius;
boolean showHidden = user.canInteractVanished();
- for (Player onlinePlayer : server.getOnlinePlayers())
+ for (User player: ess.getOnlineUsers())
{
- final User player = ess.getUser(onlinePlayer);
- if (!player.equals(user) && (!player.isHidden(user.getBase()) || showHidden || user.getBase().canSee(onlinePlayer)))
+ if (!player.equals(user) && (!player.isHidden(user.getBase()) || showHidden || user.getBase().canSee(player.getBase())))
{
final Location playerLoc = player.getLocation();
if (playerLoc.getWorld() != world)