mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-02-14 19:42:12 +01:00
fix: Improve error handling for regex filter
This commit is contained in:
parent
1e711ac258
commit
15ae0ea54f
@ -69,7 +69,12 @@ public class RegexContentFilter implements ContentFilter {
|
||||
return false;
|
||||
}
|
||||
String text = ChatColor.stripColor(String.valueOf(value));
|
||||
return regexPattern.matcher(text).find();
|
||||
try {
|
||||
return regexPattern.matcher(text).find();
|
||||
} catch (PatternSyntaxException ignored) {
|
||||
Logging.fine("Error parsing regex '%s' for input '%s'", regexString, text);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user