refactor: rewrite ComponentUtilities component parser (still a bit broken but at least a bit better on the codestyle side)

This commit is contained in:
ChomeNS
2024-12-28 17:55:04 +07:00
parent 9b675bfed4
commit 052e57a799
6 changed files with 265 additions and 253 deletions

View File

@@ -339,7 +339,7 @@ public class ChatPlugin extends Bot.Listener {
if (bot.options.useChat) {
if (!targets.equals("@a")) return; // worst fix of all time!1!
final String stringified = ComponentUtilities.stringifyMotd(component).replace("§", "&");
final String stringified = ComponentUtilities.stringifySectionSign(component).replace("§", "&");
send(stringified);
} else {
bot.core.run("minecraft:tellraw " + targets + " " + GsonComponentSerializer.gson().serialize(component));