mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-11-14 19:34:58 -05:00
Merge pull request #2 from btilm305/master
Fix packet read/write info for Packet207SetScoreboardScore
This commit is contained in:
commit
fd72886ead
1 changed files with 8 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue