3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-19 04:50:06 +01:00

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

* commit '9e04f2f765194c087b52c3707a482ed9d5e56c8d':
  Use PlayerList's UUID->EntityPlayer map in CraftServer.getPlayer(UUID)
Dieser Commit ist enthalten in:
Thinkofdeath 2014-12-05 18:22:38 +01:00
Commit 91ee2c2365

Datei anzeigen

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