use pocketmine\network\mcpe\NetworkSession; use pocketmine\network\mcpe\protocol\types\EntityLink; class SetEntityLinkPacket extends DataPacket{ public const NETWORK_ID = ProtocolInfo::SET_ENTITY_LINK_PACKET; /** @var EntityLink */ public $link; protected function decodePayload(){ $this->link = $this->getEntityLink(); } protected function encodePayload(){ $this->putEntityLink($this->link); } public function handle(NetworkSession $session) : bool{ return $session->handleSetEntityLink($this); } }