Convert <underline> to <underlined>

This commit is contained in:
libraryaddict 2024-09-02 01:36:21 +12:00
parent 7756225388
commit 3162f3b35e

View File

@ -2822,7 +2822,10 @@ public class DisguiseUtilities {
message = message.replace("§" + color.getChar(), "<" + color.name().toLowerCase(Locale.ENGLISH) + ">");
}
String serialized = internalComponentSerializer.serialize(getMiniMessage().deserialize(message.replace("§", "&")));
// The <underline> thing is because the proper syntax is <underlined> but it's not consistant among several plugins including
// Essentials & Kyori
String serialized = internalComponentSerializer.serialize(getMiniMessage().deserialize(
message.replace("<underline>", "<underlined>").replace("</underline>", "</underlined>").replace("§", "&")));
return externalComponentSerializer.deserialize(serialized);
}