Door Placement, Breaking and Activation

This commit is contained in:
Shoghi Cervantes Pueyo 2013-02-03 22:39:30 +01:00
parent 9cdd616852
commit a5651c0f43
7 changed files with 117 additions and 87 deletions

View file

@ -38,6 +38,14 @@ class GenericBlock extends Block{
return false;
}
public function onBreak(BlockAPI $level, Item $item, Player $player){
if($this->inWorld === true){
$level->setBlock($this, 0, 0);
return true;
}
return false;
}
public function onUpdate(BlockAPI $level, $type){
return false;
}