Class Slot

java.lang.Object
ch.njol.skript.util.slot.Slot
All Implemented Interfaces:
Debuggable
Direct Known Subclasses:
CursorSlot, DroppedItemSlot, ItemFrameSlot, Slot, SlotWithIndex, ThrowableProjectileSlot

public abstract class Slot extends Object implements Debuggable
Represents a container for a single item. It could be an ordinary inventory slot or perhaps an item frame.
  • Constructor Details

    • Slot

      protected Slot()
  • Method Details

    • getItem

      public abstract @Nullable org.bukkit.inventory.ItemStack getItem()
    • setItem

      public abstract void setItem(@Nullable org.bukkit.inventory.ItemStack item)
    • getAmount

      public abstract int getAmount()
    • setAmount

      public abstract void setAmount(int amount)
    • toString

      public final String toString()
      Description copied from interface: Debuggable
      Should return toString(null, false)
      Specified by:
      toString in interface Debuggable
      Overrides:
      toString in class Object
    • isSameSlot

      public abstract boolean isSameSlot(Slot o)
      Checks if given slot is in same position with this. Ignores slot contents.
      Parameters:
      o - Another slot
      Returns:
      True if positions equal, false otherwise.