Merge pull request #2 from btilm305/master

Fix packet read/write info for Packet207SetScoreboardScore
This commit is contained in:
Steveice10 2013-05-13 16:01:42 -07:00
commit fd72886ead

View file

@ -29,16 +29,20 @@ public class PacketUpdateScoreboard extends Packet {
public void read(DataInputStream in) throws IOException {
this.item = IOUtils.readString(in);
this.action = in.readByte();
this.scoreboard = IOUtils.readString(in);
this.value = in.readInt();
if (this.action != 1) {
this.scoreboard = IOUtils.readString(in);
this.value = in.readInt();
}
}
@Override
public void write(DataOutputStream out) throws IOException {
IOUtils.writeString(out, this.item);
out.writeByte(this.action);
IOUtils.writeString(out, this.scoreboard);
out.writeInt(this.value);
if (this.action != 1) {
IOUtils.writeString(out, this.scoreboard);
out.writeInt(this.value);
}
}
@Override