diff --git a/Plugin/src/main/java/com/willfp/ecoenchants/display/packets/PacketChat.java b/Plugin/src/main/java/com/willfp/ecoenchants/display/packets/PacketChat.java index b15b79af..01d63ec9 100644 --- a/Plugin/src/main/java/com/willfp/ecoenchants/display/packets/PacketChat.java +++ b/Plugin/src/main/java/com/willfp/ecoenchants/display/packets/PacketChat.java @@ -16,6 +16,8 @@ public class PacketChat extends AbstractPacketAdapter { public void onSend(PacketContainer packet) { for(int i = 0; i < packet.getChatComponents().size(); i++) { WrappedChatComponent component = packet.getChatComponents().read(i); + if(component == null || component.getHandle() == null) + continue; WrappedChatComponent newComponent = WrappedChatComponent.fromHandle(ChatComponent.modifyComponent(component.getHandle())); packet.getChatComponents().write(i, newComponent); }