PlayerItemUseEvent
Extends PlayerEvent
Implements Cancellable
Called when a player uses its held item, for example when throwing a projectile.
Methods
__construct()
php
public function __construct(\pocketmine\player\Player $player, \pocketmine\item\Item $item, \pocketmine\math\Vector3 $directionVector)getDirectionVector()
php
public function getDirectionVector() : \pocketmine\math\Vector3Returns the direction the player is aiming when activating this item. Used for projectile direction.
getItem()
php
public function getItem() : \pocketmine\item\ItemReturns the item used.
