Durable
Extends Item
Properties
$damage protected
php
protected int $damageMethods
applyDamage()
php
public function applyDamage(int $amount) : boolApplies damage to the item.
deserializeCompoundTag() protected
php
protected function deserializeCompoundTag(\pocketmine\nbt\tag\CompoundTag $tag) : voidgetDamage()
php
public function getDamage() : intgetMaxDurability()
php
abstract public function getMaxDurability() : intReturns the maximum amount of damage this item can take before it breaks.
getUnbreakingDamageReduction() protected
php
protected function getUnbreakingDamageReduction(int $amount) : intisBroken()
php
public function isBroken() : boolReturns whether the item is broken.
isUnbreakable()
php
public function isUnbreakable() : boolReturns whether this item will take damage when used.
onBroken() protected
php
protected function onBroken() : voidCalled when the item's damage exceeds its maximum durability.
serializeCompoundTag() protected
php
protected function serializeCompoundTag(\pocketmine\nbt\tag\CompoundTag $tag) : voidsetDamage()
php
public function setDamage(int $damage) : \pocketmine\item\ItemsetUnbreakable()
php
public function setUnbreakable(bool $value = true) : selfSets whether the item will take damage when used.
