Package ch.njol.skript.util.slot
Class SlotWithIndex
java.lang.Object
ch.njol.skript.util.slot.Slot
ch.njol.skript.util.slot.SlotWithIndex
- All Implemented Interfaces:
Debuggable
- Direct Known Subclasses:
EquipmentSlot
,InventorySlot
Represents a slot which has index.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract int
getIndex()
Gets an index of this slot.int
Gets the raw index of this slot.boolean
isSameSlot
(Slot o) Checks if given slot is in same position with this.Methods inherited from class ch.njol.skript.util.slot.Slot
getAmount, getItem, setAmount, setItem, toString
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
-
SlotWithIndex
public SlotWithIndex()
-
-
Method Details
-
getIndex
public abstract int getIndex()Gets an index of this slot.- Returns:
- Index of the slot.
-
getRawIndex
public int getRawIndex()Gets the raw index of this slot.- Returns:
- Raw index of the slot.
-
isSameSlot
Description copied from class:Slot
Checks if given slot is in same position with this. Ignores slot contents.- Specified by:
isSameSlot
in classSlot
- Parameters:
o
- Another slot- Returns:
- True if positions equal, false otherwise.
-