use pocketmine\network\mcpe\NetworkSession; class SimpleEventPacket extends DataPacket{ const NETWORK_ID = ProtocolInfo::SIMPLE_EVENT_PACKET; /** @var int */ public $unknownShort1; protected function decodePayload(){ $this->unknownShort1 = $this->getLShort(); } protected function encodePayload(){ $this->putLShort($this->unknownShort1); } public function handle(NetworkSession $session) : bool{ return $session->handleSimpleEvent($this); } }