Merge pull request #30 in SPIGOT/craftbukkit from ~ZREED/craftbukkit:master to master

* commit '475a7cb5793692771e726cbd9d76ad9fc25bc3eb':
  Use PlayerList's UUID->EntityPlayer map in CraftServer.getPlayer(UUID)

By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
CraftBukkit/Spigot 2014-12-05 18:22:38 +01:00
commit 42cddd043c

View File

@ -415,13 +415,12 @@ public final class CraftServer implements Server {
return null;
}
// TODO: In 1.8+ this should use the server's UUID->EntityPlayer map
@Override
public Player getPlayer(UUID id) {
for (Player player : getOnlinePlayers()) {
if (player.getUniqueId().equals(id)) {
return player;
}
EntityPlayer player = playerList.a(id);
if (player != null) {
return player.getBukkitEntity();
}
return null;