Fix serialization apply the color white when it should not

This commit is contained in:
libraryaddict 2023-09-04 00:30:02 +12:00
parent f310d10e79
commit eb21541424

View File

@ -2720,7 +2720,9 @@ public class DisguiseUtilities {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
for (BaseComponent component : components) { for (BaseComponent component : components) {
net.md_5.bungee.api.ChatColor color = component.getColor(); net.md_5.bungee.api.ChatColor color = component.getColorRaw();
if (color != null) {
String string = color.toString(); String string = color.toString();
if (string.length() > 2) { if (string.length() > 2) {
@ -2728,6 +2730,7 @@ public class DisguiseUtilities {
} else { } else {
builder.append(string); builder.append(string);
} }
}
if (component.isBold()) { if (component.isBold()) {
builder.append(net.md_5.bungee.api.ChatColor.BOLD); builder.append(net.md_5.bungee.api.ChatColor.BOLD);