mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 05:05:16 +01:00
Less config checks in loop, added newline at EOF
This commit is contained in:
parent
69fcc1706e
commit
91b60be572
@ -76,9 +76,10 @@ public class PlayerList {
|
||||
public Player[] getVisiblePlayers(String worldName) {
|
||||
ArrayList<Player> visiblePlayers = new ArrayList<Player>();
|
||||
Player[] onlinePlayers = server.getOnlinePlayers();
|
||||
boolean useWhitelist = configuration.getBoolean("display-whitelist", false);
|
||||
for (int i = 0; i < onlinePlayers.length; i++) {
|
||||
Player p = onlinePlayers[i];
|
||||
if (p.getWorld().getName().equals(worldName) && !(configuration.getBoolean("display-whitelist", false) ^ hiddenPlayerNames.contains(p.getName().toLowerCase()))) {
|
||||
if (p.getWorld().getName().equals(worldName) && !(useWhitelist ^ hiddenPlayerNames.contains(p.getName().toLowerCase()))) {
|
||||
visiblePlayers.add(p);
|
||||
}
|
||||
}
|
||||
@ -90,9 +91,10 @@ public class PlayerList {
|
||||
public Player[] getVisiblePlayers() {
|
||||
ArrayList<Player> visiblePlayers = new ArrayList<Player>();
|
||||
Player[] onlinePlayers = server.getOnlinePlayers();
|
||||
boolean useWhitelist = configuration.getBoolean("display-whitelist", false);
|
||||
for (int i = 0; i < onlinePlayers.length; i++) {
|
||||
Player p = onlinePlayers[i];
|
||||
if (!(configuration.getBoolean("display-whitelist", false) ^ hiddenPlayerNames.contains(p.getName().toLowerCase()))) {
|
||||
if (!(useWhitelist ^ hiddenPlayerNames.contains(p.getName().toLowerCase()))) {
|
||||
visiblePlayers.add(p);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user