Change legacySerilizer to serialize using bungee hex colors

This commit is contained in:
Marc Baloup 2021-07-20 01:25:17 +02:00
parent 326ee13bef
commit bdb944f961
Signed by: marcbal
GPG Key ID: BBC0FE3ABC30B893
1 changed files with 5 additions and 1 deletions

View File

@ -55,8 +55,12 @@ public abstract class Chat extends ChatStatic implements HoverEventSource<Compon
return toBungeeArray(getAdv());
}
private static final LegacyComponentSerializer LEGACY_SERIALIZER_BUNGEE_FIENDLY = LegacyComponentSerializer.builder()
.hexColors()
.useUnusualXRepeatedCharacterHexFormat()
.build();
public String getLegacyText() {
return LegacyComponentSerializer.legacySection().serialize(getAdv());
return LEGACY_SERIALIZER_BUNGEE_FIENDLY.serialize(getAdv());
}
@SuppressWarnings("deprecation")