mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Switched gamemode handler to Player object
This commit is contained in:
parent
4aa0f8f8d1
commit
d2dcf4f43a
10 changed files with 33 additions and 18 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue