Class EquipmentSlot

All Implemented Interfaces:
Debuggable

public class EquipmentSlot extends SlotWithIndex
Represents equipment slot of an entity.
  • Constructor Details

    • EquipmentSlot

      public EquipmentSlot(org.bukkit.inventory.EntityEquipment e, EquipmentSlot.EquipSlot slot, boolean slotToString)
    • EquipmentSlot

      public EquipmentSlot(org.bukkit.inventory.EntityEquipment e, EquipmentSlot.EquipSlot slot)
    • EquipmentSlot

      public EquipmentSlot(org.bukkit.entity.HumanEntity holder, int index)
  • Method Details

    • getItem

      @Nullable public @Nullable org.bukkit.inventory.ItemStack getItem()
      Specified by:
      getItem in class Slot
    • setItem

      public void setItem(@Nullable @Nullable org.bukkit.inventory.ItemStack item)
      Specified by:
      setItem in class Slot
    • getAmount

      public int getAmount()
      Specified by:
      getAmount in class Slot
    • setAmount

      public void setAmount(int amount)
      Specified by:
      setAmount in class Slot
    • getEquipSlot

      public EquipmentSlot.EquipSlot getEquipSlot()
      Gets underlying armor slot enum.
      Returns:
      Armor slot.
    • getIndex

      public int getIndex()
      Description copied from class: SlotWithIndex
      Gets an index of this slot.
      Specified by:
      getIndex in class SlotWithIndex
      Returns:
      Index of the slot.
    • toString

      public String toString(@Nullable @Nullable org.bukkit.event.Event event, boolean debug)
      Parameters:
      event - The event to get information from. This is always null if debug == false.
      debug - If true this should print more information, if false this should print what is shown to the end user
      Returns:
      String representation of this object