Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 13:00:06 +01:00
Simplify isOnline() logic.
Dieser Commit ist enthalten in:
Ursprung
55589cd363
Commit
1f73bbb56a
@ -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() {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren