45 $this->reason = VarInt::readSignedInt($in);
46 $type = VarInt::readUnsignedInt($in);
47 $this->message = $type === 0 ? CommonTypes::getString($in) : null;
48 $this->filteredMessage = $type === 0 ? CommonTypes::getString($in) : null;
52 VarInt::writeSignedInt($out, $this->reason);
53 VarInt::writeUnsignedInt($out, ($skipMessage = $this->message ===
null && $this->filteredMessage ===
null) ? 1 : 0);
55 CommonTypes::putString($out, $this->message ??
"");
56 CommonTypes::putString($out, $this->filteredMessage ??
"");