From b4ccdaa51c5e3ce8fbfb68536dc3a044fe0a1cff Mon Sep 17 00:00:00 2001 From: Janmm14 Date: Sat, 18 Dec 2021 23:54:37 +0100 Subject: [PATCH] #2715: Improve BadPacketException message in MinecraftDecoder --- .../main/java/net/md_5/bungee/protocol/MinecraftDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java b/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java index d36b7f3c..773e954c 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java @@ -41,7 +41,7 @@ public class MinecraftDecoder extends MessageToMessageDecoder 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 {