mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-25 01:57:55 +01:00
Fix read/write mismatch
This commit is contained in:
parent
72002ed3bd
commit
9a4150cd47
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user