Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 04:50:06 +01:00
Simplify OfflinePlayer.getPlayer() logic.
Dieser Commit ist enthalten in:
Ursprung
1f73bbb56a
Commit
65cd4d79fd
@ -144,14 +144,7 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
for (Object obj : server.getHandle().players) {
|
||||
EntityPlayer player = (EntityPlayer) obj;
|
||||
if (player.getUniqueID().equals(getUniqueId())) {
|
||||
return (player.playerConnection != null) ? player.playerConnection.getPlayer() : null;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
return server.getPlayer(getUniqueId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren