mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2024-12-01 13:43:28 +01:00
sponge: Fix claim getPlayers method. Fixes #150
This commit is contained in:
parent
ab9250d67e
commit
9434871d17
@ -1769,26 +1769,14 @@ public List<Entity> getEntities() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return entityList;
|
return entityList;
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Player> getPlayers() {
|
|
||||||
Collection<Player> worldPlayerList = Sponge.getServer().getWorld(this.world.getUniqueId()).get().getPlayers();
|
|
||||||
List<Player> playerList = new ArrayList<>();
|
|
||||||
for (Player player : worldPlayerList) {
|
|
||||||
if (!(player.isRemoved() && this.contains(VecHelper.toVector3i(player.getLocation())))) {
|
|
||||||
playerList.add(player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return playerList;
|
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<UUID> getPlayers() {
|
public List<UUID> getPlayers() {
|
||||||
Collection<Player> worldPlayerList = Sponge.getServer().getWorld(this.world.getUniqueId()).get().getPlayers();
|
Collection<Player> worldPlayerList = Sponge.getServer().getWorld(this.world.getUniqueId()).get().getPlayers();
|
||||||
List<UUID> playerList = new ArrayList<>();
|
List<UUID> playerList = new ArrayList<>();
|
||||||
for (Player player : worldPlayerList) {
|
for (Player player : worldPlayerList) {
|
||||||
if (!(player.isRemoved() && this.contains(player.getLocation().getBlockPosition()))) {
|
if (!player.isRemoved() && this.contains(player.getLocation().getBlockPosition())) {
|
||||||
playerList.add(player.getUniqueId());
|
playerList.add(player.getUniqueId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user