Closed 4drian3d closed 1 year ago
if I understood correctly(correct me if it's not good), to add the hex colors support I just need to add a variable like this: private static final LegacyComponentSerializer SERIALIZER = LegacyComponentSerializer.builder() .character('&') .hexColors() .build(); and after to set the color to the string I need to do this: SERIALIZER.deserialize(string)
if I understood correctly(correct me if it's not good), to add the hex colors support I just need to add a variable like this: private static final LegacyComponentSerializer SERIALIZER = LegacyComponentSerializer.builder() .character('&') .hexColors() .build(); and after to set the color to the string I need to do this: SERIALIZER.deserialize(string)
The LegacyComponentSerializer converts a string to components applying the colors correctly simulating how Minecraft used to apply the colors (currently it is deprecated to use the "§" symbol and in any update Mojang may remove it)