diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpSession.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpSession.java index 83f2c78d1..5ebf7335e 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpSession.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpSession.java @@ -400,7 +400,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { if (cause instanceof TimeoutException) { message = Component.translatable("disconnect.timeout"); } else { - message = Component.translatable("disconnect.genericReason", "Internal Exception: " + cause); + message = Component.translatable("disconnect.genericReason", Component.text("Internal Exception: " + cause)); } this.disconnect(message, cause); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ClientListener.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ClientListener.java index 7f2dcbb5a..48f86f39c 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ClientListener.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ClientListener.java @@ -89,7 +89,7 @@ public void packetReceived(Session session, Packet packet) { session.disconnect(Component.translatable("disconnect.loginFailedInfo", Component.translatable("disconnect.loginFailedInfo.invalidSession")), e); return; } catch (RequestException e) { - session.disconnect(Component.translatable("disconnect.loginFailedInfo", e.getMessage()), e); + session.disconnect(Component.translatable("disconnect.loginFailedInfo", Component.text(e.getMessage())), e); return; }