It's a pet plugin. Everytime i mount on the pet it gives this internal Code: ArgumentCountError: "Too few arguments to function pocketmine\network\mcpe\protocol\types\EntityLink::__construct(), 0 passed in /plugins/BlockPets/src/BlockHorizons/BlockPets/pets/BasePet.php on line 868 and exactly 5 expected" (EXCEPTION) in "src/pocketmine/network/mcpe/protocol/types/EntityLink" at line 43 PHP: public function addLink(Entity $entity, int $type): void { $this->removeLink($entity, $type); $viewers = $this->getViewers(); switch($type) { case self::LINK_RIDER: $link = new EntityLink(); $link->fromEntityUniqueId = $this->getId(); $link->type = self::STATE_SITTING; $link->toEntityUniqueId = $entity->getId(); $link->bool1 = true; if($entity instanceof Player) { $pk = new SetActorLinkPacket(); $pk->link = $link; $entity->dataPacket($pk); $link_2 = new EntityLink(); $link_2->fromEntityUniqueId = $this->getId(); $link_2->type = self::STATE_SITTING; $link_2->toEntityUniqueId = 0; $link_2->bool1 = true; $pk = new SetActorLinkPacket(); $pk->link = $link_2; $entity->dataPacket($pk); unset($viewers[$entity->getLoaderId()]); } break; I've already tried giving it more args. But i keep getting the same error.
You should provide the arguments when you are creating the object. In the example you show us, you don't pass any arguments to the constructor of the class. You would have to use this: PHP: $link_2 = new EntityLink($this->getId(), 0, self::STATE_SITTING, true, false); You should look at the EntityLink class https://github.com/pmmp/PocketMine-...etwork/mcpe/protocol/types/EntityLink.php#L43