diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/netty/Instruction.java b/protocol/src/main/java/net/md_5/bungee/protocol/netty/Instruction.java index f6cd82bc..9a25a2a8 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/netty/Instruction.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/netty/Instruction.java @@ -19,6 +19,7 @@ abstract class Instruction static final Instruction LONG = new Jump( 8 ); static final Instruction METADATA = new MetaData(); static final Instruction OPTIONAL_MOTION = new OptionalMotion(); + static final Instruction SCORE = new Score(); static final Instruction SHORT = new Jump( 2 ); static final Instruction SHORT_BYTE = new ShortHeader( BYTE ); static final Instruction SHORT_ITEM = new ShortHeader( ITEM ); diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/netty/Score.java b/protocol/src/main/java/net/md_5/bungee/protocol/netty/Score.java new file mode 100644 index 00000000..f5feb541 --- /dev/null +++ b/protocol/src/main/java/net/md_5/bungee/protocol/netty/Score.java @@ -0,0 +1,19 @@ +package net.md_5.bungee.protocol.netty; + +import io.netty.buffer.ByteBuf; +import java.io.IOException; + +public class Score extends Instruction +{ + + @Override + void read(ByteBuf in) throws IOException + { + STRING.read( in ); + if ( in.readByte() == 0 ) + { + STRING.read( in ); + INT.read( in ); + } + } +}