diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ServerListener.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ServerListener.java index 2f0ac6039..71b6f93bd 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ServerListener.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ServerListener.java @@ -214,9 +214,9 @@ private void beginLogin(Session session, MinecraftProtocol protocol, ClientInten isTransfer = transferred; session.switchOutboundProtocol(() -> protocol.setOutboundState(ProtocolState.LOGIN)); if (packet.getProtocolVersion() > protocol.getCodec().getProtocolVersion()) { - session.disconnect(Component.translatable("multiplayer.disconnect.incompatible", protocol.getCodec().getMinecraftVersion())); + session.disconnect(Component.translatable("multiplayer.disconnect.incompatible", Component.text(protocol.getCodec().getMinecraftVersion()))); } else if (packet.getProtocolVersion() < protocol.getCodec().getProtocolVersion()) { - session.disconnect(Component.translatable("multiplayer.disconnect.outdated_client", protocol.getCodec().getMinecraftVersion())); + session.disconnect(Component.translatable("multiplayer.disconnect.outdated_client", Component.text(protocol.getCodec().getMinecraftVersion()))); } else { session.switchInboundProtocol(() -> protocol.setInboundState(ProtocolState.LOGIN)); }