PlayerEntityInteractEvent
Extends PlayerEvent
Implements Cancellable
Called when a player interacts with an entity (e.g. shearing a sheep, naming a mob using a nametag).
Methods
__construct()
php
public function __construct(\pocketmine\player\Player $player, \pocketmine\entity\Entity $entity, \pocketmine\math\Vector3 $clickPos)getClickPosition()
php
public function getClickPosition() : \pocketmine\math\Vector3Returns the absolute coordinates of the click. This is usually on the surface of the entity's hitbox.
getEntity()
php
public function getEntity() : \pocketmine\entity\Entity