Class ItemArmorBehavior

java.lang.Object
org.cloudburstmc.server.item.behavior.CloudItemBehavior
org.cloudburstmc.server.item.behavior.ItemArmorBehavior
All Implemented Interfaces:
org.cloudburstmc.api.item.behavior.ItemBehavior

public abstract class ItemArmorBehavior extends CloudItemBehavior
author: MagicDroidX Nukkit Project
  • Constructor Details

    • ItemArmorBehavior

      public ItemArmorBehavior()
  • Method Details

    • isArmor

      public boolean isArmor()
      Specified by:
      isArmor in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      isArmor in class CloudItemBehavior
    • isHelmet

      public boolean isHelmet()
      Specified by:
      isHelmet in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      isHelmet in class CloudItemBehavior
    • isChestplate

      public boolean isChestplate()
      Specified by:
      isChestplate in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      isChestplate in class CloudItemBehavior
    • isLeggings

      public boolean isLeggings()
      Specified by:
      isLeggings in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      isLeggings in class CloudItemBehavior
    • isBoots

      public boolean isBoots()
      Specified by:
      isBoots in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      isBoots in class CloudItemBehavior
    • onClickAir

      public boolean onClickAir(org.cloudburstmc.api.item.ItemStack item, com.nukkitx.math.vector.Vector3f directionVector, org.cloudburstmc.api.player.Player p)
      Description copied from class: CloudItemBehavior
      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.
      Specified by:
      onClickAir in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      onClickAir in class CloudItemBehavior
      directionVector - direction
      p - player
      Returns:
      item changed
    • getEnchantAbility

      public int getEnchantAbility(org.cloudburstmc.api.item.ItemStack item)
      Specified by:
      getEnchantAbility in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      getEnchantAbility in class CloudItemBehavior