From b7132196fb6cbdd02b59df61744478879d3d5ec4 Mon Sep 17 00:00:00 2001 From: Dan Mulloy Date: Sat, 2 Jan 2021 23:19:20 -0500 Subject: [PATCH] Fix ChatExtensions exception Fixes #1045 --- .../java/com/comphenix/protocol/utility/ChatExtensions.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/comphenix/protocol/utility/ChatExtensions.java b/src/main/java/com/comphenix/protocol/utility/ChatExtensions.java index d2a64b8f..e4fa85c9 100644 --- a/src/main/java/com/comphenix/protocol/utility/ChatExtensions.java +++ b/src/main/java/com/comphenix/protocol/utility/ChatExtensions.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; +import com.comphenix.protocol.wrappers.EnumWrappers; import com.comphenix.protocol.wrappers.WrappedChatComponent; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -94,6 +95,7 @@ public class ChatExtensions { for (WrappedChatComponent component : components) { PacketContainer packet = new PacketContainer(PacketType.Play.Server.CHAT); packet.getChatComponents().write(0, component); + packet.getChatTypes().write(0, EnumWrappers.ChatType.SYSTEM); if (MinecraftVersion.NETHER_UPDATE_2.atOrAbove()) { packet.getUUIDs().write(0, SERVER_UUID); }