I have created an custom entity class which extends Entity. Now i want to leash that entity with an player. How can i do this? I found this: http://prntscr.com/kh6pdo in Entity but i didnt help me. Also I found nothing on this forums about leashing.
You'll have to set the flag you posted an image of and set the holder entity to the player the leash should be connected to.
PHP: $this->setGenericFlag(self::DATA_FLAG_LEASHED, true); $this->setGenericFlag(self::DATA_OWNER_EID, $player->getId()); This doesnt work :/
Slapper had that bug when 0.16 came out. I used a fork then so I would load old plugins (I was not a developer) and I have a leash bug with the human slappers.
PHP: $this->propertyManager->setLong(self::DATA_LEAD_HOLDER_EID, $player->getId()); This worked for me