mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-19 13:51:42 +01:00
Fix matcher bug
This commit is contained in:
parent
e6023c2e81
commit
51bfe23f98
@ -67,6 +67,8 @@ public class StringHelper {
|
|||||||
|
|
||||||
public static String parseColors(String parsed) {
|
public static String parseColors(String parsed) {
|
||||||
Matcher matcher = COLOR_MATCHER.matcher(parsed);
|
Matcher matcher = COLOR_MATCHER.matcher(parsed);
|
||||||
|
if (!matcher.matches())
|
||||||
|
return parsed;
|
||||||
String replace = matcher.group(1) != null ? GROUP_1 : GROUP_2;
|
String replace = matcher.group(1) != null ? GROUP_1 : GROUP_2;
|
||||||
return matcher.replaceAll(replace);
|
return matcher.replaceAll(replace);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user