Implemented basic tool durability

This commit is contained in:
Shoghi Cervantes 2013-08-19 17:37:08 +02:00
parent a7b739d17f
commit 68e78ba40b
4 changed files with 47 additions and 4 deletions

View file

@ -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;
}
}