Send signature headers when chat event viewers are modified

Fixes #8275
This commit is contained in:
Nassim Jahnke 2022-08-10 09:59:28 +02:00
parent 22ad9eedec
commit 954b3fb7d5
No known key found for this signature in database
GPG key ID: 6BE3B555EBC5982B
2 changed files with 7 additions and 4 deletions

View file

@ -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<Audience, net.minecraft.network.chat.Component> msgFunction) {