Made ExplosionPrimeEvent accept setting block breaking settings

This commit is contained in:
Shoghi Cervantes
2014-10-10 22:39:06 +02:00
parent 0dba14074a
commit 0dd46c835c
3 changed files with 37 additions and 2 deletions

View File

@ -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;
}
}