Use INSTANCE instead of legacy() due to shading issues

This commit is contained in:
MattBDev 2020-03-02 22:32:47 -05:00
parent 9241e2d018
commit dd4d405b36

View File

@ -40,7 +40,7 @@ public class Caption {
private static Component color(TextComponent text) { private static Component color(TextComponent text) {
String content = text.content(); String content = text.content();
if (content.indexOf('&') != -1) { if (content.indexOf('&') != -1) {
TextComponent legacy = LegacyComponentSerializer.legacy().deserialize(content, '&'); TextComponent legacy = LegacyComponentSerializer.INSTANCE.deserialize(content, '&');
legacy = (TextComponent) legacy.style(text.style()); legacy = (TextComponent) legacy.style(text.style());
if (!text.children().isEmpty()) { if (!text.children().isEmpty()) {
text = TextComponent.builder().append(legacy).append(text.children()).build(); text = TextComponent.builder().append(legacy).append(text.children()).build();