Only enable compression for 1.8 clients

This commit is contained in:
Thinkofdeath 2015-09-13 08:59:42 +01:00
parent 4e94c278da
commit c626254825

View File

@ -585,7 +585,7 @@ public final class UserConnection implements ProxiedPlayer
public void setCompressionThreshold(int compressionThreshold)
{
if ( ch.getHandle().isActive() && this.compressionThreshold == -1 )
if ( ch.getHandle().isActive() && this.compressionThreshold == -1 && getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
{
this.compressionThreshold = compressionThreshold;
unsafe.sendPacket( new SetCompression( compressionThreshold ) );