use pocketmine\network\mcpe\NetworkSession; class ActorPickRequestPacket extends DataPacket{ public const NETWORK_ID = ProtocolInfo::ACTOR_PICK_REQUEST_PACKET; /** @var int */ public $entityUniqueId; /** @var int */ public $hotbarSlot; protected function decodePayload(){ $this->entityUniqueId = $this->getLLong(); $this->hotbarSlot = $this->getByte(); } protected function encodePayload(){ $this->putLLong($this->entityUniqueId); $this->putByte($this->hotbarSlot); } public function handle(NetworkSession $session) : bool{ return $session->handleActorPickRequest($this); } }