Class InventorySlot

All Implemented Interfaces:
Debuggable

public class InventorySlot extends SlotWithIndex
Represents a slot in some inventory.
  • Constructor Details

    • InventorySlot

      public InventorySlot(org.bukkit.inventory.Inventory invi, int index, int rawIndex)
    • InventorySlot

      public InventorySlot(org.bukkit.inventory.Inventory invi, int index)
  • Method Details

    • getInventory

      public org.bukkit.inventory.Inventory getInventory()
    • 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.
    • getRawIndex

      public int getRawIndex()
      Description copied from class: SlotWithIndex
      Gets the raw index of this slot.
      Overrides:
      getRawIndex in class SlotWithIndex
      Returns:
      Raw index of the slot.
    • 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
    • toString

      public String toString(@Nullable @Nullable org.bukkit.event.Event e, boolean debug)
      Parameters:
      e - 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