forked from LogBlock/LogBlock
@@ -376,9 +376,12 @@ public class Consumer extends TimerTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void queueChat(Actor player, String message) {
|
public void queueChat(Actor player, String message) {
|
||||||
for (String ignored : Config.ignoredChat) {
|
if (!Config.ignoredChat.isEmpty()) {
|
||||||
if (message.startsWith(ignored)) {
|
String lowerCaseMessage = message.toLowerCase();
|
||||||
return;
|
for (String ignored : Config.ignoredChat) {
|
||||||
|
if (lowerCaseMessage.startsWith(ignored)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hiddenPlayers.contains(player.getName().toLowerCase())) {
|
if (hiddenPlayers.contains(player.getName().toLowerCase())) {
|
||||||
|
@@ -44,7 +44,7 @@ public class Config {
|
|||||||
public static String banPermission;
|
public static String banPermission;
|
||||||
public static Set<Material> hiddenBlocks;
|
public static Set<Material> hiddenBlocks;
|
||||||
public static Set<String> hiddenPlayers;
|
public static Set<String> hiddenPlayers;
|
||||||
public static Set<String> ignoredChat;
|
public static List<String> ignoredChat;
|
||||||
public static SimpleDateFormat formatter;
|
public static SimpleDateFormat formatter;
|
||||||
public static boolean safetyIdCheck;
|
public static boolean safetyIdCheck;
|
||||||
public static boolean debug;
|
public static boolean debug;
|
||||||
@@ -176,9 +176,9 @@ public class Config {
|
|||||||
throw new DataFormatException("Not a valid material in hiddenBlocks: '" + blocktype + "'");
|
throw new DataFormatException("Not a valid material in hiddenBlocks: '" + blocktype + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ignoredChat = new HashSet<String>();
|
ignoredChat = new ArrayList<String>();
|
||||||
for (String chatCommand : config.getStringList("logging.ignoredChat")) {
|
for (String chatCommand : config.getStringList("logging.ignoredChat")) {
|
||||||
ignoredChat.add(chatCommand);
|
ignoredChat.add(chatCommand.toLowerCase());
|
||||||
}
|
}
|
||||||
dontRollback = new HashSet<Material>();
|
dontRollback = new HashSet<Material>();
|
||||||
for (String e : config.getStringList("rollback.dontRollback")) {
|
for (String e : config.getStringList("rollback.dontRollback")) {
|
||||||
|
Reference in New Issue
Block a user