Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Ursprung
c9c233b796
Commit
76c834a849
@ -721,18 +721,15 @@ public class CraftWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<Player> getPlayers() {
|
public List<Player> getPlayers() {
|
||||||
List<Player> list = new ArrayList<Player>();
|
List<Player> list = new ArrayList<Player>(world.players.size());
|
||||||
|
|
||||||
for (Object o : world.entityList) {
|
for (EntityHuman human : world.players) {
|
||||||
if (o instanceof net.minecraft.server.Entity) {
|
HumanEntity bukkitEntity = human.getBukkitEntity();
|
||||||
net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o;
|
|
||||||
Entity bukkitEntity = mcEnt.getBukkitEntity();
|
|
||||||
|
|
||||||
if ((bukkitEntity != null) && (bukkitEntity instanceof Player)) {
|
if ((bukkitEntity != null) && (bukkitEntity instanceof Player)) {
|
||||||
list.add((Player) bukkitEntity);
|
list.add((Player) bukkitEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren