From ec41049c8d361187cccdeeb7ad5d7a0ce103ace6 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 19 Nov 2020 10:16:26 +1100 Subject: [PATCH] #770: Send messages without sender with SYSTEM type again This was the behaviour before the 1.16 update and made it so that any message sent by a plugin was treated as a system message allowing the player to disable chat messages while keeping access to commands. After 1.16 disabling the chat also disabled any plugin output, this restores the original behaviour. By: Phoenix616 --- .../main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index c50e2ae007..bbcd3299c1 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -195,7 +195,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (getHandle().playerConnection == null) return; for (IChatBaseComponent component : CraftChatMessage.fromString(message)) { - getHandle().playerConnection.sendPacket(new PacketPlayOutChat(component, ChatMessageType.CHAT, SystemUtils.b)); + getHandle().playerConnection.sendPacket(new PacketPlayOutChat(component, ChatMessageType.SYSTEM, SystemUtils.b)); } }