mirror of
https://github.com/darksaid98/nightcore-spigot.git
synced 2026-12-02 06:28:53 +00:00
legacy colors fix
This commit is contained in:
1 parent
64bf57fb8f
commit
5ad34d5749
1 file changed
+4
@@ -117,8 +117,12 @@ public class NightMessage {
|
||||
public static BaseComponent[] parse(@NotNull String string, @NotNull TagPool tagPool) {
|
||||
if (CoreConfig.LEGACY_COLOR_SUPPORT.get()) {
|
||||
TimedMatcher timedMatcher = TimedMatcher.create(Colorizer.PATTERN_HEX_LEGACY, string);
|
||||
Set<String> rawCodes = new HashSet<>();
|
||||
while (timedMatcher.find()) {
|
||||
String hex = timedMatcher.getMatcher().group(1);
|
||||
rawCodes.add(hex);
|
||||
}
|
||||
for (String hex : rawCodes) {
|
||||
string = string.replace(hex, Tag.brackets(hex));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user