fix: even more ansi color fix, but now it's section sign color codes

This commit is contained in:
ChomeNS
2024-12-14 17:16:54 +07:00
parent e9de7eb801
commit 7e42a5cf43
2 changed files with 7 additions and 2 deletions

View File

@@ -1 +1 @@
1259
1260

View File

@@ -258,7 +258,12 @@ public class ComponentUtilities {
replacedContent = Pattern
.compile("(§.)")
.matcher(message.content())
.replaceAll(m -> ansiMap.get(m.group(0).substring(1)));
.replaceAll(m -> {
final String code = m.group(0).substring(1);
if (!code.equals("r")) return ansiMap.get(code);
else return color;
});
} catch (Exception ignored) {}
}