use pocketmine\network\mcpe\NetworkSession; class BlockEventPacket extends DataPacket{ const NETWORK_ID = ProtocolInfo::BLOCK_EVENT_PACKET; public $x; public $y; public $z; public $case1; public $case2; public function decodePayload(){ $this->getBlockPosition($this->x, $this->y, $this->z); $this->case1 = $this->getVarInt(); $this->case2 = $this->getVarInt(); } public function encodePayload(){ $this->putBlockPosition($this->x, $this->y, $this->z); $this->putVarInt($this->case1); $this->putVarInt($this->case2); } public function handle(NetworkSession $session) : bool{ return $session->handleBlockEvent($this); } }