mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Adventure Mode
This commit is contained in:
parent
eaa3006d51
commit
d24d826ffd
5 changed files with 32 additions and 14 deletions
|
|
@ -96,7 +96,7 @@ class BlockAPI{
|
|||
return;
|
||||
}
|
||||
$target = $this->server->api->level->getBlock($data["x"], $data["y"], $data["z"]);
|
||||
if(isset(Material::$unbreakable[$target[0]])){
|
||||
if(isset(Material::$unbreakable[$target[0]]) or $this->server->gamemode === 2){
|
||||
return $this->cancelAction($target);
|
||||
}
|
||||
$drop = array(
|
||||
|
|
@ -392,6 +392,10 @@ class BlockAPI{
|
|||
if($cancelPlace === true){
|
||||
return false;
|
||||
}
|
||||
|
||||
if($this->server->gamemode === 2){
|
||||
return $this->cancelAction($block);
|
||||
}
|
||||
|
||||
$replace = false;
|
||||
switch($data["block"]){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue