Skip to content

EntityShootCrossbowEvent 5.46.0 ​

final class · pocketmine\event\entity\EntityShootCrossbowEvent · source

Extends EntityEvent
Implements Cancellable

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Living $shooter, \pocketmine\item\Item $crossbow, array $projectiles)

getCrossbow() ​

php
public function getCrossbow() : \pocketmine\item\Item

getProjectiles() ​

php
public function getProjectiles() : array

Returns projectiles shot by crossbow. Can be more than 1 if multishot enchantment has applied.

Note: This might not return a Projectile if a plugin modified the target entity.

setProjectiles() ​

php
public function setProjectiles(array $projectiles) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.