Class InventorySlot

All Implemented Interfaces:

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

    • 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
      Index of the slot.
    • getItem

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

      public void setItem(@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 org.bukkit.event.Event e, boolean debug)
      e - The event to get information to. 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
      String representation of this object