forked from LogBlock/LogBlock
Case insensitive hiddenPlayers
This commit is contained in:
@@ -353,7 +353,7 @@ public class Consumer extends TimerTask
|
|||||||
}
|
}
|
||||||
|
|
||||||
static boolean hide(Player player) {
|
static boolean hide(Player player) {
|
||||||
final String playerName = player.getName();
|
final String playerName = player.getName().toLowerCase();
|
||||||
if (hiddenPlayers.contains(playerName)) {
|
if (hiddenPlayers.contains(playerName)) {
|
||||||
hiddenPlayers.remove(playerName);
|
hiddenPlayers.remove(playerName);
|
||||||
return false;
|
return false;
|
||||||
@@ -389,7 +389,7 @@ public class Consumer extends TimerTask
|
|||||||
ca = event.getChestAccess();
|
ca = event.getChestAccess();
|
||||||
}
|
}
|
||||||
// Do this last so LogBlock still has final say in what is being added
|
// Do this last so LogBlock still has final say in what is being added
|
||||||
if (playerName == null || loc == null || typeBefore < 0 || typeAfter < 0 || typeBefore > 255 || typeAfter > 255 || hiddenPlayers.contains(playerName) || !isLogged(loc.getWorld()) || typeBefore != typeAfter && hiddenBlocks.contains(typeBefore) && hiddenBlocks.contains(typeAfter)) return;
|
if (playerName == null || loc == null || typeBefore < 0 || typeAfter < 0 || typeBefore > 255 || typeAfter > 255 || hiddenPlayers.contains(playerName.toLowerCase()) || !isLogged(loc.getWorld()) || typeBefore != typeAfter && hiddenBlocks.contains(typeBefore) && hiddenBlocks.contains(typeAfter)) return;
|
||||||
queue.add(new BlockRow(loc, playerName.replaceAll("[^a-zA-Z0-9_]", ""), typeBefore, typeAfter, data, signtext, ca));
|
queue.add(new BlockRow(loc, playerName.replaceAll("[^a-zA-Z0-9_]", ""), typeBefore, typeAfter, data, signtext, ca));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -146,7 +146,7 @@ public class Config
|
|||||||
}
|
}
|
||||||
hiddenPlayers = new HashSet<String>();
|
hiddenPlayers = new HashSet<String>();
|
||||||
for (final String playerName : config.getStringList("logging.hiddenPlayers"))
|
for (final String playerName : config.getStringList("logging.hiddenPlayers"))
|
||||||
hiddenPlayers.add(playerName);
|
hiddenPlayers.add(playerName.toLowerCase().trim());
|
||||||
hiddenBlocks = new HashSet<Integer>();
|
hiddenBlocks = new HashSet<Integer>();
|
||||||
for (final Object blocktype : config.getList("logging.hiddenBlocks")) {
|
for (final Object blocktype : config.getList("logging.hiddenBlocks")) {
|
||||||
final Material mat = Material.matchMaterial(String.valueOf(blocktype));
|
final Material mat = Material.matchMaterial(String.valueOf(blocktype));
|
||||||
|
Reference in New Issue
Block a user