mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 04:09:54 +01:00
Simplify isOnline() logic.
This commit is contained in:
parent
55589cd363
commit
1f73bbb56a
@ -105,13 +105,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public boolean isOnline() {
|
||||
for (Object obj : server.getHandle().players) {
|
||||
EntityPlayer player = (EntityPlayer) obj;
|
||||
if (player.getName().equalsIgnoreCase(getName())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return server.getPlayer(getUniqueId()) != null;
|
||||
}
|
||||
|
||||
public InetSocketAddress getAddress() {
|
||||
|
Loading…
Reference in New Issue
Block a user