Package ch.njol.skript.util.slot
Class Slot
java.lang.Object
ch.njol.skript.util.slot.Slot
- All Implemented Interfaces:
Debuggable
- Direct Known Subclasses:
CursorSlot,DroppedItemSlot,ItemFrameSlot,Slot,SlotWithIndex,ThrowableProjectileSlot
Represents a container for a single item. It could be an ordinary inventory
slot or perhaps an item frame.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intabstract @Nullable org.bukkit.inventory.ItemStackgetItem()abstract booleanisSameSlot(Slot o)Checks if given slot is in same position with this.abstract voidsetAmount(int amount)abstract voidsetItem(@Nullable org.bukkit.inventory.ItemStack item)toString()Should returntoString(null, false)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.njol.skript.lang.Debuggable
toString
-
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
Description copied from interface:DebuggableShould returntoString(null, false)- Specified by:
toStringin interfaceDebuggable- Overrides:
toStringin classObject
-
isSameSlot
Checks if given slot is in same position with this. Ignores slot contents.- Parameters:
o- Another slot- Returns:
- True if positions equal, false otherwise.
-