diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ServerListener.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ServerListener.java index d120cb720..0e157afc6 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ServerListener.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ServerListener.java @@ -262,7 +262,7 @@ private void authenticate(Session session, boolean shouldAuthenticate, SecretKey int threshold = session.getFlag(MinecraftConstants.SERVER_COMPRESSION_THRESHOLD, DEFAULT_COMPRESSION_THRESHOLD); session.send(new ClientboundLoginCompressionPacket(threshold), () -> - session.setCompressionThreshold(threshold >= 0 ? + session.setCompression(threshold >= 0 ? new CompressionConfig(threshold, new ZlibCompression(), true) : null)); session.send(new ClientboundGameProfilePacket(profile, true));