forked from LogBlock/LogBlock
Added ability to disable id sanity check
This commit is contained in:
@@ -391,7 +391,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.toLowerCase()) || !isLogged(loc.getWorld()) || typeBefore != typeAfter && hiddenBlocks.contains(typeBefore) && hiddenBlocks.contains(typeAfter)) return;
|
if (playerName == null || loc == null || typeBefore < 0 || typeAfter < 0 || (Config.safetyIdCheck && (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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -45,6 +45,7 @@ public class Config
|
|||||||
public static Set<String> hiddenPlayers;
|
public static Set<String> hiddenPlayers;
|
||||||
public static Set<String> ignoredChat;
|
public static Set<String> ignoredChat;
|
||||||
public static SimpleDateFormat formatter;
|
public static SimpleDateFormat formatter;
|
||||||
|
public static boolean safetyIdCheck;
|
||||||
|
|
||||||
public static enum LogKillsLevel
|
public static enum LogKillsLevel
|
||||||
{
|
{
|
||||||
@@ -123,6 +124,7 @@ public class Config
|
|||||||
def.put("tools.toolblock.params", "area 0 all sum none limit 15 desc silent");
|
def.put("tools.toolblock.params", "area 0 all sum none limit 15 desc silent");
|
||||||
def.put("tools.toolblock.mode", "LOOKUP");
|
def.put("tools.toolblock.mode", "LOOKUP");
|
||||||
def.put("tools.toolblock.permissionDefault", "OP");
|
def.put("tools.toolblock.permissionDefault", "OP");
|
||||||
|
def.put("safety.id.check", true);
|
||||||
for (final Entry<String, Object> e : def.entrySet())
|
for (final Entry<String, Object> e : def.entrySet())
|
||||||
if (!config.contains(e.getKey()))
|
if (!config.contains(e.getKey()))
|
||||||
config.set(e.getKey(), e.getValue());
|
config.set(e.getKey(), e.getValue());
|
||||||
@@ -175,6 +177,7 @@ public class Config
|
|||||||
askClearLogs = config.getBoolean("questioner.askClearLogs", true);
|
askClearLogs = config.getBoolean("questioner.askClearLogs", true);
|
||||||
askClearLogAfterRollback = config.getBoolean("questioner.askClearLogAfterRollback", true);
|
askClearLogAfterRollback = config.getBoolean("questioner.askClearLogAfterRollback", true);
|
||||||
askRollbackAfterBan = config.getBoolean("questioner.askRollbackAfterBan", false);
|
askRollbackAfterBan = config.getBoolean("questioner.askRollbackAfterBan", false);
|
||||||
|
safetyIdCheck = config.getBoolean("safety.id.check", true);
|
||||||
banPermission = config.getString("questioner.banPermission");
|
banPermission = config.getString("questioner.banPermission");
|
||||||
final List<Tool> tools = new ArrayList<Tool>();
|
final List<Tool> tools = new ArrayList<Tool>();
|
||||||
final ConfigurationSection toolsSec = config.getConfigurationSection("tools");
|
final ConfigurationSection toolsSec = config.getConfigurationSection("tools");
|
||||||
|
Reference in New Issue
Block a user