Do not drop blocks in creative mode

This commit is contained in:
Shoghi Cervantes Pueyo 2012-12-24 13:07:58 +01:00
parent 067147f750
commit 529bb8a262

View File

@ -70,7 +70,7 @@ class BlockAPI{
}
break;
}
if($drop !== false and $drop[0] !== 0 and $drop[2] > 0){
if($drop !== false and $drop[0] !== 0 and $drop[2] > 0 and $this->server->gamemode !== 1){
$this->drop($data["x"], $data["y"], $data["z"], $drop[0], $drop[1] & 0x0F, $drop[2] & 0xFF);
}
$this->server->trigger("player.block.break", $data);