diff --git a/src/main/java/com/github/steveice10/mc/protocol/packet/login/clientbound/ClientboundLoginDisconnectPacket.java b/src/main/java/com/github/steveice10/mc/protocol/packet/login/clientbound/ClientboundLoginDisconnectPacket.java index 03ad71d1b..a51a98f4d 100644 --- a/src/main/java/com/github/steveice10/mc/protocol/packet/login/clientbound/ClientboundLoginDisconnectPacket.java +++ b/src/main/java/com/github/steveice10/mc/protocol/packet/login/clientbound/ClientboundLoginDisconnectPacket.java @@ -22,8 +22,8 @@ public ClientboundLoginDisconnectPacket(String text) { this(DefaultComponentSerializer.get().deserialize(text)); } - public ClientboundLoginDisconnectPacket(ByteBuf in, MinecraftCodecHelper codecHelper) throws IOException { - this.reason = DefaultComponentSerializer.get().deserialize(codecHelper.readString(in)); + public ClientboundLoginDisconnectPacket(ByteBuf in, MinecraftCodecHelper helper) throws IOException { + this.reason = helper.readComponent(in); } @Override