From e1763a2679da3eecd55f6357f103b3f26550baea Mon Sep 17 00:00:00 2001 From: Riley Park <rileysebastianpark@gmail.com> Date: Mon, 22 Feb 2021 00:45:21 -0800 Subject: [PATCH] fix stupid legacy chat garbage --- Spigot-Server-Patches/Adventure.patch | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/Adventure.patch b/Spigot-Server-Patches/Adventure.patch index 7a821e4254..e2af07dc37 100644 --- a/Spigot-Server-Patches/Adventure.patch +++ b/Spigot-Server-Patches/Adventure.patch @@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.wrapped = wrapped; + } + -+ IChatBaseComponent deepConverted() { ++ public IChatBaseComponent deepConverted() { + IChatBaseComponent converted = this.converted; + if (converted == null) { + converted = PaperAdventure.WRAPPER_AWARE_SERIALIZER.serialize(this.wrapped); @@ -2901,3 +2901,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override 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;