Armor
Extends Durable
Constants
TAG_CUSTOM_COLOR
php
public const TAG_CUSTOM_COLOR = "customColor"Properties
$customColor protected
php
protected ?\pocketmine\color\Color $customColorMethods
__construct()
php
public function __construct(\pocketmine\item\ItemIdentifier $identifier, string $name, \pocketmine\item\ArmorTypeInfo $info, array $enchantmentTags = [])clearCustomColor()
php
public function clearCustomColor() : selfdeserializeCompoundTag() protected
php
protected function deserializeCompoundTag(\pocketmine\nbt\tag\CompoundTag $tag) : voidgetArmorSlot()
php
public function getArmorSlot() : intgetCustomColor()
php
public function getCustomColor() : ?\pocketmine\color\ColorReturns the dyed colour of this armour piece. This generally only applies to leather armour.
getDefensePoints()
php
public function getDefensePoints() : intgetEnchantability()
php
public function getEnchantability() : intgetEnchantmentProtectionFactor()
php
public function getEnchantmentProtectionFactor(\pocketmine\event\entity\EntityDamageEvent $event) : intReturns the total enchantment protection factor this armour piece offers from all applicable protection enchantments on the item.
getMaterial()
php
public function getMaterial() : \pocketmine\item\ArmorMaterialgetMaxDurability()
php
public function getMaxDurability() : intgetMaxStackSize()
php
public function getMaxStackSize() : intgetTrim() 5.46.0
php
public function getTrim() : ?\pocketmine\item\ArmorTrimgetUnbreakingDamageReduction() protected
php
protected function getUnbreakingDamageReduction(int $amount) : intisFireProof()
php
public function isFireProof() : boolonClickAir()
php
public function onClickAir(\pocketmine\player\Player $player, \pocketmine\math\Vector3 $directionVector, array &$returnedItems) : \pocketmine\item\ItemUseResultserializeCompoundTag() protected
php
protected function serializeCompoundTag(\pocketmine\nbt\tag\CompoundTag $tag) : voidsetCustomColor()
php
public function setCustomColor(\pocketmine\color\Color $color) : selfSets the dyed colour of this armour piece. This generally only applies to leather armour.
setTrim() 5.46.0
php
public function setTrim(?\pocketmine\item\ArmorTrim $trim) : self