mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Fix for block breaking event
This commit is contained in:
parent
b169e269b8
commit
7ce0209b6c
1 changed files with 2 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ class BlockAPI{
|
|||
}
|
||||
$target = $this->server->api->level->getBlock($data["x"], $data["y"], $data["z"]);
|
||||
if(isset(Material::$unbreakable[$target[0]])){
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
$drop = array(
|
||||
$target[0], //Block
|
||||
|
|
@ -143,6 +143,7 @@ class BlockAPI{
|
|||
}
|
||||
$this->server->trigger("player.block.break", $data);
|
||||
$this->updateBlocksAround($data["x"], $data["y"], $data["z"], BLOCK_UPDATE_NORMAL);
|
||||
return false;
|
||||
}
|
||||
|
||||
public function drop($x, $y, $z, $block, $meta, $stack = 1){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue