Fix another case of missing chat headers

This commit is contained in:
Nassim Jahnke 2022-10-18 10:20:35 +02:00
parent ed2c88ba89
commit e1d4b26a62
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
1 changed files with 9 additions and 1 deletions

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fix command preprocess cancelling and command changing
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e88c82aac6d9947c7205f865c18146e7a5756b40..1ff25ce408aba3620455f74e1535b5862b3bbdf9 100644 index e88c82aac6d9947c7205f865c18146e7a5756b40..8ae8055c185237a76159285c8fce3aacc295fb3b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2259,13 +2259,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -2259,13 +2259,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@ -38,3 +38,11 @@ index e88c82aac6d9947c7205f865c18146e7a5756b40..1ff25ce408aba3620455f74e1535b586
// CraftBukkit end // CraftBukkit end
Iterator iterator = map.values().iterator(); Iterator iterator = map.values().iterator();
@@ -2569,6 +2580,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
});
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { // Re-add "Command Only" flag check
+ this.server.getPlayerList().broadcastMessageHeader(message, Set.of()); // Paper
this.send(new ClientboundSystemChatPacket(Component.translatable("chat.cannotSend").withStyle(ChatFormatting.RED), false));
} else {
this.chat(s, message, true);