diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index abc135ea34..40f52f1ec0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -105,13 +105,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public boolean isOnline() { - for (Object obj : server.getHandle().players) { - EntityPlayer player = (EntityPlayer) obj; - if (player.getName().equalsIgnoreCase(getName())) { - return true; - } - } - return false; + return server.getPlayer(getUniqueId()) != null; } public InetSocketAddress getAddress() {