Class ItemArmor

java.lang.Object
cn.nukkit.item.Item
cn.nukkit.item.ItemArmor
All Implemented Interfaces:
BlockID, ItemDurable, ItemID, Cloneable
Direct Known Subclasses:
ItemBootsChain, ItemBootsDiamond, ItemBootsGold, ItemBootsIron, ItemBootsNetherite, ItemChestplateChain, ItemChestplateDiamond, ItemChestplateGold, ItemChestplateIron, ItemChestplateNetherite, ItemColorArmor, ItemCustomArmor, ItemElytra, ItemHelmetChain, ItemHelmetDiamond, ItemHelmetGold, ItemHelmetIron, ItemHelmetNetherite, ItemLeggingsChain, ItemLeggingsDiamond, ItemLeggingsGold, ItemLeggingsIron, ItemLeggingsNetherite, ItemTurtleShell

public abstract class ItemArmor extends Item implements ItemDurable
Author:
MagicDroidX (Nukkit Project)
  • Field Details

  • Constructor Details

    • ItemArmor

      public ItemArmor(int id)
    • ItemArmor

      public ItemArmor(int id, Integer meta)
    • ItemArmor

      public ItemArmor(int id, Integer meta, int count)
    • ItemArmor

      public ItemArmor(int id, Integer meta, int count, String name)
  • Method Details

    • getMaxStackSize

      public int getMaxStackSize()
      Description copied from class: Item
      定义物品堆叠的最大数量

      Define the maximum number of items to be stacked

      Overrides:
      getMaxStackSize in class Item
      Returns:
    • isArmor

      public boolean isArmor()
      Description copied from class: Item
      定义物品是否为盔甲

      Define if the item is a Armor

      Overrides:
      isArmor in class Item
      Returns:
    • onClickAir

      @PowerNukkitDifference(info="Using new method to play sounds", since="1.4.0.0-PN") public boolean onClickAir(Player player, Vector3 directionVector)
      Description copied from class: Item
      玩家在空气中投掷如三叉戟一样 返回物品是否改变,例如数量变化或耐久度

      Called when a player uses the item on air, for example throwing a projectile. Returns whether the item was changed, for example count decrease or durability change.

      Overrides:
      onClickAir in class Item
      Parameters:
      player - player
      directionVector - direction
      Returns:
      item changed
    • getEnchantAbility

      public int getEnchantAbility()
      Description copied from class: Item
      定义物品的附魔

      Define the enchantment of an item

      Overrides:
      getEnchantAbility in class Item
      Returns:
    • isUnbreakable

      public boolean isUnbreakable()
      Description copied from class: Item
      定义物品是否不可损坏

      Define if the item is Unbreakable

      Overrides:
      isUnbreakable in class Item
      Returns: