From 9a4150cd479119e251fa79ef6e0ddd85406cc391 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 15 Nov 2016 08:15:32 +1100 Subject: [PATCH] Fix read/write mismatch --- .../src/main/java/net/md_5/bungee/protocol/packet/Title.java | 4 ++-- 1 file changed, 2 insertions(+), 2 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 5e93e28d..48ef530c 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 @@ -55,7 +55,7 @@ public class Title extends DefinedPacket @Override public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) { - int index = readVarInt( buf ); + 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 ) @@ -63,7 +63,7 @@ public class Title extends DefinedPacket index++; } - action = Action.values()[index]; + writeVarInt( index, buf ); switch ( action ) { case TITLE: