Fix blocked-words

This commit is contained in:
Draycia committed 2020-09-04 03:41:14 -07:00
1 parent 4b29191623
commit eaf172b683
1 file changed
+4 -6
@@ -52,12 +52,10 @@ public class FilterHandler implements Listener {
}
for (String replacement : config.getStringList("filters.blocked-words")) {
for (String word : filters.getStringList(replacement)) {
if (carbonChat.getModConfig().getBoolean("filters.case-sensitive")) {
blockedWords.add(Pattern.compile(word));
} else {
blockedWords.add(Pattern.compile(word, Pattern.CASE_INSENSITIVE));
}
if (carbonChat.getModConfig().getBoolean("filters.case-sensitive")) {
blockedWords.add(Pattern.compile(replacement));
} else {
blockedWords.add(Pattern.compile(replacement, Pattern.CASE_INSENSITIVE));
}
}
}