#2715: Improve BadPacketException message in MinecraftDecoder

This commit is contained in:
Janmm14 2021-12-18 23:54:37 +01:00 committed by GitHub
parent 3a11656909
commit b4ccdaa51c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ public class MinecraftDecoder extends MessageToMessageDecoder<ByteBuf>
if ( in.isReadable() ) if ( in.isReadable() )
{ {
throw new BadPacketException( "Did not read all bytes from packet " + packet.getClass() + " " + packetId + " Protocol " + protocol + " Direction " + prot.getDirection() ); throw new BadPacketException( "Packet " + protocol + ":" + prot.getDirection() + "/" + packetId + " (" + packet.getClass().getSimpleName() + ") larger than expected, extra bytes: " + in.readableBytes() );
} }
} else } else
{ {