mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-25 10:07:37 +01:00
Less config checks in loop, added newline at EOF
This commit is contained in:
parent
69fcc1706e
commit
91b60be572
@ -3,4 +3,4 @@ dynmap.fullrender # Issue a full render
|
||||
dynmap.hide.self # Hide self from map
|
||||
dynmap.hide.others # Hide others from map
|
||||
dynmap.show.self # Reveal self on map
|
||||
dynmap.show.others # Reveal others on map
|
||||
dynmap.show.others # Reveal others on map
|
||||
|
@ -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