diff --git a/src/main/java/net/minestom/server/utils/PacketUtils.java b/src/main/java/net/minestom/server/utils/PacketUtils.java index 0cae41f01..c8c005341 100644 --- a/src/main/java/net/minestom/server/utils/PacketUtils.java +++ b/src/main/java/net/minestom/server/utils/PacketUtils.java @@ -198,7 +198,7 @@ public final class PacketUtils { if (packetSize >= MinecraftServer.getCompressionThreshold()) { // Packet large enough, compress buffer.position(contentStart); - final ByteBuffer uncompressedContent = buffer.slice().limit(contentStart + packetSize); + final ByteBuffer uncompressedContent = buffer.slice().limit(packetSize); final ByteBuffer uncompressedCopy = localBuffer().put(uncompressedContent).flip(); Deflater deflater = COMPRESSOR.get();