public class CustomArmor extends CustomItem
CHEST_UUID, FEET_UUID, HEAD_UUID, LEGS_UUID, LORE_PREFIX, LORE_SUFFIX, MAIN_HAND_UUID, OFF_HAND_UUID
Constructor and Description |
---|
CustomArmor(org.bukkit.Material material,
int amount,
short durability,
java.lang.String idName)
Creates a Custom Armor Piece.
|
Modifier and Type | Method and Description |
---|---|
CustomArmor |
addArmor(double amount)
Adds the
Attributes.AttributeType Armor with the amount specified using the
addition operation. |
CustomArmor |
addArmorToughness(double amount)
Adds the
Attributes.AttributeType Armor Toughness with the amount specified
using the addition operation. |
CustomArmor |
addAttribute(Attributes.AttributeType type,
double amount,
Attributes.Operation operation)
Adds an Attribute to the CustomItem.
|
ArmorType |
getArmorType() |
ArmorDurability |
getDurabilityMechanics() |
CustomArmor |
setDurabilityMechanics(ArmorDurability armorDurability)
These determine how the durability of the CustomArmor, both for Fake and
real durability, will drop.
|
CustomItem |
setDurabilityMechanics(ItemDurability itemDurability)
Deprecated.
|
addAllCustomRecipes, addAttribute, addAttribute, addAttribute, addCustomRecipe, addEnchantment, addForbiddenEnchantment, addForbiddenEnchantment, addItemFlag, addLoreLine, clearAttributes, clone, compareTo, getAmount, getAttributes, getAttributeVisibility, getBurnTime, getCanBePlacedVisibility, getCanDestroyVisibility, getCustomRecipes, getDisplayName, getDurability, getEnchantmentVisibility, getEnchantmnets, getFakeDurability, getForbidenEnchantments, getFullLore, getIdName, getItemFlags, getItemType, getLore, getMaterial, getPermissions, getPotionEffectsVisibility, getUnbreakableVisibility, hasFakeDurability, hasHoeAbilities, isCombinableInCrafting, isEnchantable, isUnbreakable, setAmount, setAttributes, setAttributeVisibility, setBurnTime, setCanBePlacedVisibility, setCanDestroyVisibility, setCombinedInCrafting, setDisplayName, setDurability, setEnchantable, setEnchantmentVisibility, setFakeDurability, setHoeAbilities, setIdName, setLore, setMaterial, setPermissions, setPotionEffectsVisibility, setUnbreakable, setUnbreakableVisibility
public CustomArmor(org.bukkit.Material material, int amount, short durability, java.lang.String idName)
material
- The Material that the Custom Armor will be made of. Valid
Materials are all that contain in their name HELMET,
CHESTPLATE, LEGGINGS or BOOTS.amount
- The amount of the Custom Armor. Recommended value is one, as
Armor Pieces do not have a stackable size higher than 1 by
default.durability
- The Durability of the Custom Armor.idName
- the Custom Armor's ID Name. This MUST BE SIMILAR to
"vanilla_additions:emerald_sword" and is saved in the
ItemStack so you can easily detect which Custom Armor it is.public ArmorType getArmorType()
ArmorType.getArmorType(Material)
method, where material
is the Custom Armor's Material.public CustomArmor addAttribute(Attributes.AttributeType type, double amount, Attributes.Operation operation)
EquipmentSlot
will be automatically added by checking the
Armor Type of the Material of the Custom Armor.type
- The attribute that will be added.amount
- The amount of the attribute. Can also be a negative value.operation
- The math operation that will be used for the amount specified.public ArmorDurability getDurabilityMechanics()
getDurabilityMechanics
in class CustomItem
@Deprecated public CustomItem setDurabilityMechanics(ItemDurability itemDurability)
setDurabilityMechanics
in class CustomItem
itemDurability
- the itemDurability to set. Every class that extends or is
ArmorDurability
is valid.public CustomArmor setDurabilityMechanics(ArmorDurability armorDurability)
armorDurability
- the armorDurbility to set. Every class that extends or is
ArmorDurability
is valid.public CustomArmor addArmor(double amount)
Attributes.AttributeType
Armor with the amount specified using the
addition operation.amount
- The amount of armor to be added.public CustomArmor addArmorToughness(double amount)
Attributes.AttributeType
Armor Toughness with the amount specified
using the addition operation. The Armor Toughness Attribute was added in
1.9.1, so, just like this plugin, it won't work on earlier versions of
Minecraft. I haven't tested this feature on those old versions!amount
- The amount of armor to be added.