mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-21 05:44:33 +00:00
Simplify isOnline() logic.
This commit is contained in:
parent
55589cd363
commit
1f73bbb56a
1 changed files with 1 additions and 7 deletions
|
@ -105,13 +105,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOnline() {
|
public boolean isOnline() {
|
||||||
for (Object obj : server.getHandle().players) {
|
return server.getPlayer(getUniqueId()) != null;
|
||||||
EntityPlayer player = (EntityPlayer) obj;
|
|
||||||
if (player.getName().equalsIgnoreCase(getName())) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public InetSocketAddress getAddress() {
|
public InetSocketAddress getAddress() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue