From 1af7f42af528098c972c450c84f65015835dceb2 Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Mon, 16 Dec 2024 00:40:25 +0100 Subject: [PATCH] fix mapping issue in PlayerChatMessage --- .../net/minecraft/network/chat/PlayerChatMessage.java.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paper-server/patches/sources/net/minecraft/network/chat/PlayerChatMessage.java.patch b/paper-server/patches/sources/net/minecraft/network/chat/PlayerChatMessage.java.patch index bf7ae66175..cd887f5354 100644 --- a/paper-server/patches/sources/net/minecraft/network/chat/PlayerChatMessage.java.patch +++ b/paper-server/patches/sources/net/minecraft/network/chat/PlayerChatMessage.java.patch @@ -51,10 +51,10 @@ - Component component = !message.equals(Component.literal(this.signedContent())) ? message : null; + // Paper start - adventure + final Component component; -+ if (unsignedContent instanceof io.papermc.paper.adventure.AdventureComponent advComponent) { -+ component = this.signedContent().equals(io.papermc.paper.adventure.AdventureCodecs.tryCollapseToString(advComponent.adventure$component())) ? null : unsignedContent; ++ if (message instanceof io.papermc.paper.adventure.AdventureComponent advComponent) { ++ component = this.signedContent().equals(io.papermc.paper.adventure.AdventureCodecs.tryCollapseToString(advComponent.adventure$component())) ? null : message; + } else { -+ component = !unsignedContent.equals(Component.literal(this.signedContent())) ? unsignedContent : null; ++ component = !message.equals(Component.literal(this.signedContent())) ? message : null; + } + // Paper end - adventure return new PlayerChatMessage(this.link, this.signature, this.signedBody, component, this.filterMask);