mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Made ExplosionPrimeEvent accept setting block breaking settings
This commit is contained in:
@ -31,6 +31,7 @@ class ExplosionPrimeEvent extends EntityEvent implements Cancellable{
|
||||
public static $handlerList = null;
|
||||
|
||||
protected $force;
|
||||
private $blockBreaking;
|
||||
|
||||
/**
|
||||
* @param Entity $entity
|
||||
@ -39,6 +40,7 @@ class ExplosionPrimeEvent extends EntityEvent implements Cancellable{
|
||||
public function __construct(Entity $entity, $force){
|
||||
$this->entity = $entity;
|
||||
$this->force = $force;
|
||||
$this->blockBreaking = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -52,4 +54,18 @@ class ExplosionPrimeEvent extends EntityEvent implements Cancellable{
|
||||
$this->force = (float) $force;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isBlockBreaking(){
|
||||
return $this->blockBreaking;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $affectsBlocks
|
||||
*/
|
||||
public function setBlockBreaking($affectsBlocks){
|
||||
$this->blockBreaking = (bool) $affectsBlocks;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user