From 954b3fb7d5215acba1c736ba88174a9de3642ce4 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 10 Aug 2022 09:59:28 +0200 Subject: [PATCH] Send signature headers when chat event viewers are modified Fixes #8275 --- patches/server/0008-Adventure.patch | 7 +++++-- ...ion-to-use-vanilla-per-world-scoreboard-coloring-.patch | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/patches/server/0008-Adventure.patch b/patches/server/0008-Adventure.patch index 647e6ac6a..f1aa92309 100644 --- a/patches/server/0008-Adventure.patch +++ b/patches/server/0008-Adventure.patch @@ -247,10 +247,10 @@ index 0000000000000000000000000000000000000000..87e791801b624859477025df49824637 +} diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java new file mode 100644 -index 0000000000000000000000000000000000000000..f8586ae7fe41cce772745bab2a1482c424d0b28f +index 0000000000000000000000000000000000000000..12ea885e815b6814a74ac3aa9d9c325e53721ecd --- /dev/null +++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java -@@ -0,0 +1,376 @@ +@@ -0,0 +1,379 @@ +package io.papermc.paper.adventure; + +import com.google.common.base.Suppliers; @@ -547,6 +547,9 @@ index 0000000000000000000000000000000000000000..f8586ae7fe41cce772745bab2a1482c4 + viewer.sendMessage(source, audienceMsgFunction.apply(viewer), MessageType.CHAT); + } + } ++ ++ // Make sure to send remaining headers ++ ChatProcessor.this.outgoing.sendHeadersToRemainingPlayers(ChatProcessor.this.server.getPlayerList()); + } + + private void sendToViewer(final CommandSender viewer, final ChatType.Bound chatType, final @Nullable Function msgFunction) { diff --git a/patches/server/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/patches/server/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index 04ed9957e..7ef429420 100644 --- a/patches/server/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/patches/server/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -12,7 +12,7 @@ for this on CB at one point but I can't find it. We may need to do this ourselves at some point in the future. diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java -index bc37199f1d181f572da518d9b93b2980504024b1..d5e0ed2adba4e22b9842110ddf009f47187840e4 100644 +index 12ea885e815b6814a74ac3aa9d9c325e53721ecd..28ddab1121e314e82bf764fd89f36714bd7445f8 100644 --- a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java +++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java @@ -24,8 +24,10 @@ import net.minecraft.network.chat.PlayerChatMessage; @@ -26,7 +26,7 @@ index bc37199f1d181f572da518d9b93b2980504024b1..d5e0ed2adba4e22b9842110ddf009f47 import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.craftbukkit.util.LazyPlayerSet; import org.bukkit.craftbukkit.util.Waitable; -@@ -329,10 +331,16 @@ public final class ChatProcessor { +@@ -332,10 +334,16 @@ public final class ChatProcessor { } static String legacyDisplayName(final CraftPlayer player) {