mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 22:15:37 +00:00
Handle empty or misconfigured filters.filters
This commit is contained in:
1 parent
3d0e875a4d
commit
8045a71733
1 file changed
+3
@@ -35,6 +35,7 @@ public class FilterHandler implements Listener {
|
||||
FileConfiguration config = carbonChat.getModConfig();
|
||||
ConfigurationSection filters = config.getConfigurationSection("filters.filters");
|
||||
|
||||
if (filters != null) {
|
||||
for (String replacement : filters.getKeys(false)) {
|
||||
List<Pattern> patterns = new ArrayList<>();
|
||||
|
||||
@@ -48,6 +49,8 @@ public class FilterHandler implements Listener {
|
||||
|
||||
patternReplacements.put(replacement, patterns);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (String replacement : config.getStringList("filters.blocked-words")) {
|
||||
for (String word : filters.getStringList(replacement)) {
|
||||
|
||||
Reference in new issue
Block a user