Skip to content

Armor ​

class · pocketmine\item\Armor · source

Extends Durable

Constants ​

TAG_CUSTOM_COLOR ​

php
public const TAG_CUSTOM_COLOR = "customColor"

Properties ​

$customColor protected ​

php
protected ?\pocketmine\color\Color $customColor

Methods ​

__construct() ​

php
public function __construct(\pocketmine\item\ItemIdentifier $identifier, string $name, \pocketmine\item\ArmorTypeInfo $info, array $enchantmentTags = [])

clearCustomColor() ​

php
public function clearCustomColor() : self

deserializeCompoundTag() protected ​

php
protected function deserializeCompoundTag(\pocketmine\nbt\tag\CompoundTag $tag) : void

getArmorSlot() ​

php
public function getArmorSlot() : int

getCustomColor() ​

php
public function getCustomColor() : ?\pocketmine\color\Color

Returns the dyed colour of this armour piece. This generally only applies to leather armour.

getDefensePoints() ​

php
public function getDefensePoints() : int

getEnchantability() ​

php
public function getEnchantability() : int

getEnchantmentProtectionFactor() ​

php
public function getEnchantmentProtectionFactor(\pocketmine\event\entity\EntityDamageEvent $event) : int

Returns the total enchantment protection factor this armour piece offers from all applicable protection enchantments on the item.

getMaterial() ​

php
public function getMaterial() : \pocketmine\item\ArmorMaterial

getMaxDurability() ​

php
public function getMaxDurability() : int

getMaxStackSize() ​

php
public function getMaxStackSize() : int

getTrim() 5.46.0 ​

php
public function getTrim() : ?\pocketmine\item\ArmorTrim

getUnbreakingDamageReduction() protected ​

php
protected function getUnbreakingDamageReduction(int $amount) : int

isFireProof() ​

php
public function isFireProof() : bool

onClickAir() ​

php
public function onClickAir(\pocketmine\player\Player $player, \pocketmine\math\Vector3 $directionVector, array &$returnedItems) : \pocketmine\item\ItemUseResult

serializeCompoundTag() protected ​

php
protected function serializeCompoundTag(\pocketmine\nbt\tag\CompoundTag $tag) : void

setCustomColor() ​

php
public function setCustomColor(\pocketmine\color\Color $color) : self

Sets 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

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.