mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-29 03:31:27 +01:00
Simplify OfflinePlayer.getPlayer() logic.
This commit is contained in:
parent
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
|
||||
|
Loading…
Reference in New Issue
Block a user