use pocketmine\network\mcpe\NetworkSession; class AnimatePacket extends DataPacket{ const NETWORK_ID = ProtocolInfo::ANIMATE_PACKET; public $action; public $eid; public function decode(){ $this->action = $this->getVarInt(); $this->eid = $this->getEntityId(); } public function encode(){ $this->reset(); $this->putVarInt($this->action); $this->putEntityId($this->eid); } public function handle(NetworkSession $session) : bool{ return $session->handleAnimate($this); } }