fix stupid legacy chat garbage
This commit is contained in:
@@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ this.wrapped = wrapped;
|
+ this.wrapped = wrapped;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ IChatBaseComponent deepConverted() {
|
+ public IChatBaseComponent deepConverted() {
|
||||||
+ IChatBaseComponent converted = this.converted;
|
+ IChatBaseComponent converted = this.converted;
|
||||||
+ if (converted == null) {
|
+ if (converted == null) {
|
||||||
+ converted = PaperAdventure.WRAPPER_AWARE_SERIALIZER.serialize(this.wrapped);
|
+ converted = PaperAdventure.WRAPPER_AWARE_SERIALIZER.serialize(this.wrapped);
|
||||||
@@ -2901,3 +2901,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayName() throws IllegalStateException {
|
public String getDisplayName() throws IllegalStateException {
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||||
|
@@ -0,0 +0,0 @@ public final class CraftChatMessage {
|
||||||
|
|
||||||
|
public static String fromComponent(IChatBaseComponent component) {
|
||||||
|
if (component == null) return "";
|
||||||
|
+ if (component instanceof io.papermc.paper.adventure.AdventureComponent) component = ((io.papermc.paper.adventure.AdventureComponent) component).deepConverted();
|
||||||
|
StringBuilder out = new StringBuilder();
|
||||||
|
|
||||||
|
boolean hadFormat = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user