Switched gamemode handler to Player object

This commit is contained in:
Shoghi Cervantes Pueyo 2013-02-06 16:18:15 +01:00
parent 4aa0f8f8d1
commit d2dcf4f43a
10 changed files with 33 additions and 18 deletions

View file

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