From 8574688be7512040fa2c75e101ee6f17e5444e6b Mon Sep 17 00:00:00 2001 From: Nathan Poirier Date: Tue, 15 Nov 2016 23:22:09 +0100 Subject: [PATCH] Fix compatibility of Title packet for 1.10 and lower (#1997) --- .../main/java/net/md_5/bungee/protocol/packet/Title.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Title.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Title.java index 48ef530c..89ba7a31 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Title.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Title.java @@ -31,7 +31,7 @@ public class Title extends DefinedPacket int index = readVarInt( buf ); // If we're working on 1.10 or lower, increment the value of the index so we pull out the correct value. - if ( protocolVersion <= ProtocolConstants.MINECRAFT_1_10 && index <= 2 ) + if ( protocolVersion <= ProtocolConstants.MINECRAFT_1_10 && index >= 2 ) { index++; } @@ -58,9 +58,9 @@ public class Title extends DefinedPacket int index = action.ordinal(); // If we're working on 1.10 or lower, increment the value of the index so we pull out the correct value. - if ( protocolVersion <= ProtocolConstants.MINECRAFT_1_10 && index <= 2 ) + if ( protocolVersion <= ProtocolConstants.MINECRAFT_1_10 && index >= 2 ) { - index++; + index--; } writeVarInt( index, buf );