Truly fixes parsing of &# color tags

This commit is contained in:
Kristian Knarvik 2022-11-07 01:41:20 +01:00
parent 84a2669022
commit 89456b370b

View File

@ -85,11 +85,7 @@ public final class ColorHelper {
}
Matcher matcher = pattern.matcher(message);
while (matcher.find()) {
try {
message = message.replace(matcher.group(), "" + ChatColor.of(matcher.group()));
} catch (IllegalArgumentException ignored) {
//Something was matched that wasn't a proper color after all. Ignore it.
}
message = message.replace(matcher.group(), "" + ChatColor.of(matcher.group(1)));
}
return message;
}