Skip to content

EntityExplodeEvent ​

class · pocketmine\event\entity\EntityExplodeEvent · source

Extends EntityEvent
Implements Cancellable

Called when an entity explodes, after the explosion's impact has been calculated. No changes have been made to the world at this stage.

Properties ​

$blocks ​

php
public array $blocks

$position ​

php
public \pocketmine\world\Position $position

$yield ​

php
public float $yield

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Entity $entity, \pocketmine\world\Position $position, array $blocks, float $yield, array $ignitions = [])

getBlockList() ​

php
public function getBlockList() : array

Returns a list of blocks destroyed by the explosion.

getIgnitions() ​

php
public function getIgnitions() : array

Returns a list of affected blocks that will be replaced by fire.

getPosition() ​

php
public function getPosition() : \pocketmine\world\Position

getYield() ​

php
public function getYield() : float

Returns the percentage chance of drops from each block destroyed by the explosion.

setBlockList() ​

php
public function setBlockList(array $blocks) : void

Sets the blocks destroyed by the explosion.

setIgnitions() ​

php
public function setIgnitions(array $ignitions) : void

Set the list of blocks that will be replaced by fire.

setYield() ​

php
public function setYield(float $yield) : void

Sets the percentage chance of drops from each block destroyed by the explosion.

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