Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #99 from SpigotMC/master
Browse files Browse the repository at this point in the history
Fix read/write mismatch
  • Loading branch information
sleiss authored Nov 14, 2016
2 parents 9f1f721 + 9a4150c commit c72b844
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protoco
@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 )
{
index++;
}

action = Action.values()[index];
writeVarInt( index, buf );
switch ( action )
{
case TITLE:
Expand Down

0 comments on commit c72b844

Please sign in to comment.