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,AnyAmount,AnyNamed,AnyProvider
- Direct Known Subclasses:
EquipmentSlot,InventorySlot
Represents a slot which has index.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intgetIndex()Gets an index of this slot.intGets the raw index of this slot.booleanisSameSlot(Slot slot) Checks if given slot is in same position with this.Methods inherited from class ch.njol.skript.util.slot.Slot
amount, getAmount, getItem, name, setAmount, setAmount, setItem, setName, supportsAmountChange, supportsNameChange, toStringMethods 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
-
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:SlotChecks if given slot is in same position with this. Ignores slot contents.- Specified by:
isSameSlotin classSlot- Parameters:
slot- Another slot- Returns:
- True if positions equal, false otherwise.
-