diff --git a/src/main/java/land/chipmunk/chipmunkbot/plugins/ChatPlugin.java b/src/main/java/land/chipmunk/chipmunkbot/plugins/ChatPlugin.java index abe943c..2595fc2 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/plugins/ChatPlugin.java +++ b/src/main/java/land/chipmunk/chipmunkbot/plugins/ChatPlugin.java @@ -79,7 +79,7 @@ public class ChatPlugin extends SessionAdapter { public void packetReceived (Session session, ClientboundPlayerChatPacket packet) { final MutablePlayerListEntry sender = client.playerList().getEntry(packet.getSender()); if (sender == null) return; - final PlayerMessage playerMessage = new PlayerMessage(sender, Component.text(packet.getContent()), "minecraft:chat", packet.getName()); // TODO: Fix chatType + final PlayerMessage playerMessage = new PlayerMessage(sender, packet.getUnsignedContent(), "minecraft:chat", packet.getName()); // TODO: Fix chatType for (Listener listener : this.listeners) { listener.playerMessageReceived(playerMessage); diff --git a/src/main/java/land/chipmunk/chipmunkbot/systemChat/KaboomChatParser.java b/src/main/java/land/chipmunk/chipmunkbot/systemChat/KaboomChatParser.java index 85abf9e..bb64ef9 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/systemChat/KaboomChatParser.java +++ b/src/main/java/land/chipmunk/chipmunkbot/systemChat/KaboomChatParser.java @@ -56,8 +56,6 @@ public class KaboomChatParser implements SystemChatParser { } MutablePlayerListEntry sender = client.playerList().getEntry(Component.empty().append(prefix).append(displayName)); - if (sender == null) sender = client.playerList().getEntry(prefix.append(displayName)); // deprecated - if (sender == null) sender = new MutablePlayerListEntry(new GameProfile(new UUID(0l, 0l), null), GameMode.SURVIVAL, false, 0, displayName, 0L, null, new byte[0]); return new PlayerMessage(sender, contents, "minecraft:chat", displayName); }