geforkt von Mirrors/Paper
Added getPlayer(String name) to server
Dieser Commit ist enthalten in:
Ursprung
904c220d5c
Commit
620c42b321
@ -59,6 +59,18 @@ public final class CraftServer implements Server {
|
||||
return players;
|
||||
}
|
||||
|
||||
public Player getPlayer(final String name) {
|
||||
Player[] players = getOnlinePlayers();
|
||||
|
||||
for (Player player : players) {
|
||||
if (player.getName().equalsIgnoreCase(name)) {
|
||||
return player;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public Player getPlayer(final EntityPlayerMP entity) {
|
||||
return entity.a.getPlayer();
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren