diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java index aa0cd50f..ba7f609d 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java @@ -356,10 +356,10 @@ class ChannelInjector extends ByteToMessageDecoder { @Override protected void decode(ChannelHandlerContext ctx, ByteBuf byteBuffer, List packets) throws Exception { - try { - byteBuffer.markReaderIndex(); - DECODE_BUFFER.invoke(vanillaDecoder, ctx, byteBuffer, packets); - + byteBuffer.markReaderIndex(); + DECODE_BUFFER.invoke(vanillaDecoder, ctx, byteBuffer, packets); + + try { if (packets.size() > 0) { Object input = packets.get(0); Class packetClass = input.getClass();