23 public function __construct(
28 public function getId() :
int{
return $this->id; }
30 public function getLevel() :
int{
return $this->level; }
32 public static function read(ByteBufferReader $in) :
self{
33 $id = VarInt::readUnsignedInt($in);
34 $level = Byte::readUnsigned($in);
35 return new self($id, $level);
38 public function write(ByteBufferWriter $out) :
void{
39 VarInt::writeUnsignedInt($out, $this->
id);
40 Byte::writeUnsigned($out, $this->level);