setLeashHolder

public abstract boolean setLeashHolder(Entity holder)

Sets the leash on this entity to be held by the supplied entity.

This method has no effect on EnderDragons, Withers, Players, or Bats. Non-living entities excluding leashes will not persist as leash holders.

Return

whether the operation was successful

Parameters

holder

the entity to leash this entity to