mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29:43 +00:00
Implemented basic tool durability
This commit is contained in:
parent
a7b739d17f
commit
68e78ba40b
4 changed files with 47 additions and 4 deletions
|
|
@ -39,6 +39,9 @@ class FlintSteelItem extends Item{
|
|||
return true;
|
||||
}
|
||||
$this->useOn($block);
|
||||
if($this->getMetadata() >= $this->getMaxDurability()){
|
||||
$player->setSlot($player->slot, new Item(AIR, 0, 0), false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue