Fix score add definition

This commit is contained in:
md_5 2013-03-16 20:37:36 +11:00
parent 6bb089074e
commit 34f4bae923
2 changed files with 20 additions and 0 deletions

View File

@ -19,6 +19,7 @@ abstract class Instruction
static final Instruction LONG = new Jump( 8 ); static final Instruction LONG = new Jump( 8 );
static final Instruction METADATA = new MetaData(); static final Instruction METADATA = new MetaData();
static final Instruction OPTIONAL_MOTION = new OptionalMotion(); static final Instruction OPTIONAL_MOTION = new OptionalMotion();
static final Instruction SCORE = new Score();
static final Instruction SHORT = new Jump( 2 ); static final Instruction SHORT = new Jump( 2 );
static final Instruction SHORT_BYTE = new ShortHeader( BYTE ); static final Instruction SHORT_BYTE = new ShortHeader( BYTE );
static final Instruction SHORT_ITEM = new ShortHeader( ITEM ); static final Instruction SHORT_ITEM = new ShortHeader( ITEM );

View File

@ -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 );
}
}
}