Skip to content

BlockExplodeEvent ​

class · pocketmine\event\block\BlockExplodeEvent · source

Extends BlockEvent
Implements Cancellable

Called when a block explodes, after explosion impact has been calculated.

Methods ​

__construct() ​

php
public function __construct(\pocketmine\block\Block $block, \pocketmine\world\Position $position, array $blocks, float $yield, array $ignitions)

getAffectedBlocks() ​

php
public function getAffectedBlocks() : 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.

setAffectedBlocks() ​

php
public function setAffectedBlocks(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.