mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
Simplify OfflinePlayer.getPlayer() logic.
By: md_5 <git@md-5.net>
This commit is contained in:
parent
f0c27fe66c
commit
e19d7d24a2
1 changed files with 1 additions and 8 deletions
|
@ -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 a new issue