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
-
Method Summary
Modifier and TypeMethodDescriptionabstract int
abstract @Nullable org.bukkit.inventory.ItemStack
getItem()
abstract boolean
isSameSlot
(Slot o) Checks if given slot is in same position with this.abstract void
setAmount
(int amount) abstract void
setItem
(@Nullable org.bukkit.inventory.ItemStack item) final String
toString()
Should returntoString
(null, false)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.njol.skript.lang.Debuggable
toString
-
Constructor Details
-
Slot
protected Slot()
-
-
Method Details
-
getItem
@Nullable public abstract @Nullable org.bukkit.inventory.ItemStack getItem() -
setItem
public abstract void setItem(@Nullable @Nullable org.bukkit.inventory.ItemStack item) -
getAmount
public abstract int getAmount() -
setAmount
public abstract void setAmount(int amount) -
toString
Description copied from interface:Debuggable
Should returntoString
(null, false)- Specified by:
toString
in interfaceDebuggable
- Overrides:
toString
in 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.
-