Use PaperAdventure.PLAIN instead of PlainComponentSerializer.plain() for AdventureComponent#getString (#5414)

This commit is contained in:
Jason Penilla 2021-03-25 17:01:59 -07:00
parent a12e69774f
commit 8d7a6d9c89

View File

@ -35,7 +35,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import java.util.List; +import java.util.List;
+import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.TextComponent; +import net.kyori.adventure.text.TextComponent;
+import net.kyori.adventure.text.serializer.plain.PlainComponentSerializer;
+import net.minecraft.network.chat.ChatModifier; +import net.minecraft.network.chat.ChatModifier;
+import net.minecraft.network.chat.IChatBaseComponent; +import net.minecraft.network.chat.IChatBaseComponent;
+import net.minecraft.network.chat.IChatMutableComponent; +import net.minecraft.network.chat.IChatMutableComponent;
@ -79,7 +78,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+ @Override + @Override
+ public String getString() { + public String getString() {
+ return PlainComponentSerializer.plain().serialize(this.wrapped); + return PaperAdventure.PLAIN.serialize(this.wrapped);
+ } + }
+ +
+ @Override + @Override