Use PaperAdventure.PLAIN instead of PlainComponentSerializer.plain() for AdventureComponent#getString (#5414)
This commit is contained in:
parent
6caa330c61
commit
68af93524c
1 changed files with 3 additions and 4 deletions
|
@ -22,10 +22,10 @@ index 1d03a79e9010bc514b72a81ba0ad4a62aeff1bb7..429b74474ced04d8dd8f038b8590b8df
|
|||
}
|
||||
diff --git a/src/main/java/io/papermc/paper/adventure/AdventureComponent.java b/src/main/java/io/papermc/paper/adventure/AdventureComponent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..dd018bb835e1b9fb2496404e1e5b10389fe6176d
|
||||
index 0000000000000000000000000000000000000000..89597b4a3064c3c6001c7e927a848ee73a1b1fd9
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/adventure/AdventureComponent.java
|
||||
@@ -0,0 +1,78 @@
|
||||
@@ -0,0 +1,77 @@
|
||||
+package io.papermc.paper.adventure;
|
||||
+
|
||||
+import com.google.gson.JsonElement;
|
||||
|
@ -35,7 +35,6 @@ index 0000000000000000000000000000000000000000..dd018bb835e1b9fb2496404e1e5b1038
|
|||
+import java.util.List;
|
||||
+import net.kyori.adventure.text.Component;
|
||||
+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.IChatBaseComponent;
|
||||
+import net.minecraft.network.chat.IChatMutableComponent;
|
||||
|
@ -79,7 +78,7 @@ index 0000000000000000000000000000000000000000..dd018bb835e1b9fb2496404e1e5b1038
|
|||
+
|
||||
+ @Override
|
||||
+ public String getString() {
|
||||
+ return PlainComponentSerializer.plain().serialize(this.wrapped);
|
||||
+ return PaperAdventure.PLAIN.serialize(this.wrapped);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
|
Loading…
Reference in a new issue