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() {
|
public Player getPlayer() {
|
||||||
for (Object obj : server.getHandle().players) {
|
return server.getPlayer(getUniqueId());
|
||||||
EntityPlayer player = (EntityPlayer) obj;
|
|
||||||
if (player.getUniqueID().equals(getUniqueId())) {
|
|
||||||
return (player.playerConnection != null) ? player.playerConnection.getPlayer() : null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren