mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
f
This commit is contained in:
parent
6f54da56ba
commit
c41e31e237
1 changed files with 1 additions and 4 deletions
|
|
@ -398,11 +398,8 @@ class BlockAPI{
|
|||
if($target->onBreak($item, $player) === false){
|
||||
return $this->cancelAction($target, $player, false);
|
||||
}
|
||||
$itemUse = $item->useOn($target);
|
||||
if(($player->gamemode & 0x01) === 0 and $itemUse and $item->getMetadata() >= $item->getMaxDurability()){
|
||||
if(($player->gamemode & 0x01) === 0 and $item->useOn($target) and $item->getMetadata() >= $item->getMaxDurability()){
|
||||
$player->setSlot($player->slot, new Item(AIR, 0, 0), true);
|
||||
}elseif($itemUse){
|
||||
$player->setSlot($player->slot, $item, true); //update slot meta TODO less packet sending?
|
||||
}
|
||||
}else{
|
||||
return $this->cancelAction($target, $player, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue