Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Use PlayerList's UUID->EntityPlayer map in CraftServer.getPlayer(UUID)
Dieser Commit ist enthalten in:
Ursprung
e2c4f20ed1
Commit
9e04f2f765
@ -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;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren