diff --git a/velocity/src/main/java/us/myles/ViaVersion/velocity/handlers/VelocityDecodeHandler.java b/velocity/src/main/java/us/myles/ViaVersion/velocity/handlers/VelocityDecodeHandler.java index 4981c2954..fa5ff2a79 100644 --- a/velocity/src/main/java/us/myles/ViaVersion/velocity/handlers/VelocityDecodeHandler.java +++ b/velocity/src/main/java/us/myles/ViaVersion/velocity/handlers/VelocityDecodeHandler.java @@ -34,14 +34,14 @@ public class VelocityDecodeHandler extends MessageToMessageDecoder { ByteBuf transformedBuf = ctx.alloc().buffer().writeBytes(bytebuf); try { - boolean needsCompress = handleCompressionOrder(ctx, bytebuf); + boolean needsCompress = handleCompressionOrder(ctx, transformedBuf); - info.transformIncoming(bytebuf, CancelDecoderException::generate); + info.transformIncoming(transformedBuf, CancelDecoderException::generate); if (needsCompress) { - recompress(ctx, bytebuf); + recompress(ctx, transformedBuf); } - out.add(bytebuf.retain()); + out.add(transformedBuf.retain()); } finally { transformedBuf.release(); }