#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.
This commit is contained in:
Phoenix616 2020-11-19 10:16:26 +11:00 committed by md_5
parent 4475707d74
commit 167ff59173
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -195,7 +195,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (getHandle().playerConnection == null) return; if (getHandle().playerConnection == null) return;
for (IChatBaseComponent component : CraftChatMessage.fromString(message)) { 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));
} }
} }