diff --git a/Spigot-Server-Patches/Adventure.patch b/Spigot-Server-Patches/Adventure.patch index cb9431f2a8..a29361f1db 100644 --- a/Spigot-Server-Patches/Adventure.patch +++ b/Spigot-Server-Patches/Adventure.patch @@ -123,6 +123,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.TextReplacementConfig; +import net.kyori.adventure.text.event.ClickEvent; ++import net.kyori.adventure.text.format.Style; ++import net.kyori.adventure.text.format.TextDecoration; +import net.minecraft.server.EntityPlayer; +import net.minecraft.server.IChatBaseComponent; +import net.minecraft.server.MinecraftServer; @@ -171,7 +173,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // continuing from AsyncPlayerChatEvent (without PlayerChatEvent) + event -> { + final AsyncChatEvent ae = this.createAsync( -+ legacyFormatter(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage()), ++ legacyFormatter(event.getFormat(), legacyDisplayName((CraftPlayer) event.getPlayer()), event.getMessage()), + event.getRecipients(), + PaperAdventure.LEGACY_SECTION_UXRC.deserialize(event.getMessage()) + ); @@ -189,7 +191,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + @Override + protected Void evaluate() { + final ChatEvent se = ChatProcessor.this.createSync( -+ legacyFormatter(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage()), ++ legacyFormatter(event.getFormat(), legacyDisplayName((CraftPlayer) event.getPlayer()), event.getMessage()), + event.getRecipients(), + PaperAdventure.LEGACY_SECTION_UXRC.deserialize(event.getMessage()) + ); @@ -213,6 +215,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + ); + } + ++ private static String legacyDisplayName(final CraftPlayer player) { ++ return PaperAdventure.LEGACY_SECTION_UXRC.serialize(Component.empty().append(displayName(player))); ++ } ++ + private static Component displayName(final CraftPlayer player) { + return player.displayName(); + } diff --git a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index 07b2e77e22..c6966768ac 100644 --- a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -29,7 +29,7 @@ diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/m index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java +++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java -@@ -0,0 +0,0 @@ import net.kyori.adventure.text.event.ClickEvent; +@@ -0,0 +0,0 @@ import net.kyori.adventure.text.format.TextDecoration; import net.minecraft.server.EntityPlayer; import net.minecraft.server.IChatBaseComponent; import net.minecraft.server.MinecraftServer;