Skip to content

ProjectileHitBlockEvent ​

class · pocketmine\event\entity\ProjectileHitBlockEvent · source

Extends ProjectileHitEvent

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\projectile\Projectile $entity, \pocketmine\math\RayTraceResult $rayTraceResult, \pocketmine\block\Block $blockHit)

getBlockHit() ​

php
public function getBlockHit() : \pocketmine\block\Block

Returns the Block struck by the projectile. Hint: to get the block face hit, look at the RayTraceResult.

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