Updated Who command for bukkit changes.

This commit is contained in:
Jeremy Wood 2015-07-14 13:44:44 -04:00
parent 584a81fac6
commit b64dfa34af
1 changed files with 5 additions and 5 deletions

View File

@ -52,11 +52,11 @@ public class WhoCommand extends MultiverseCommand {
showAll = false;
}
final Player[] onlinePlayers = plugin.getServer().getOnlinePlayers();
final Collection<Player> visiblePlayers = new HashSet<Player>(onlinePlayers.length);
for (final Player player : onlinePlayers) {
if (p == null || p.canSee(player)) {
visiblePlayers.add(player);
final Collection onlinePlayers = plugin.getServer().getOnlinePlayers();
final Collection<Player> visiblePlayers = new HashSet<Player>(onlinePlayers.size());
for (final Object player : onlinePlayers) {
if (player instanceof Player && (p == null || p.canSee((Player) player))) {
visiblePlayers.add((Player) player);
}
}