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

@ -28,7 +28,14 @@ the Free Software Foundation, either version 3 of the License, or
class BedrockBlock extends SolidBlock{
public function __construct(){
parent::__construct(BEDROCK, 0, "Bedrock");
$this->isBreakable = true;//$this->isBreakable = false;
$this->breakable = false;
}
public function isBreakable(Item $item, Player $player){
if($player->gamemode === 1){
return true;
}
return false;
}
}