mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 03:25:15 +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)
This commit is contained in:
commit
91ee2c2365
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user