mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Fixed items being consumed on CREATIVE mode
This commit is contained in:
parent
6fa0ef652e
commit
9d1369bfe9
7 changed files with 30 additions and 11 deletions
|
|
@ -266,10 +266,11 @@ class BlockAPI{
|
|||
$player->lastBreak = microtime(true);
|
||||
|
||||
if($this->server->api->dhandle("player.block.break", array("player" => $player, "target" => $target, "item" => $item)) !== false){
|
||||
$drops = $target->getDrops($item, $player);
|
||||
if($target->onBreak($item, $player) === false){
|
||||
return $this->cancelAction($target, $player, false);
|
||||
}
|
||||
$item->useOn($target);
|
||||
$drops = $target->getDrops($item, $player);
|
||||
}else{
|
||||
return $this->cancelAction($target, $player, false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue