mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-25 18:17:38 +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
|
@Override
|
||||||
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
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 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 )
|
||||||
@ -63,7 +63,7 @@ public class Title extends DefinedPacket
|
|||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
action = Action.values()[index];
|
writeVarInt( index, buf );
|
||||||
switch ( action )
|
switch ( action )
|
||||||
{
|
{
|
||||||
case TITLE:
|
case TITLE:
|
||||||
|
Loading…
Reference in New Issue
Block a user