Package ch.njol.skript.util.slot
Class InventorySlot
java.lang.Object
ch.njol.skript.util.slot.Slot
ch.njol.skript.util.slot.SlotWithIndex
ch.njol.skript.util.slot.InventorySlot
- All Implemented Interfaces:
Debuggable
Represents a slot in some inventory.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
getIndex()
Gets an index of this slot.org.bukkit.inventory.Inventory
@Nullable org.bukkit.inventory.ItemStack
getItem()
void
setAmount(int amount)
void
setItem(@Nullable org.bukkit.inventory.ItemStack item)
toString(@Nullable org.bukkit.event.Event e, boolean debug)
Methods inherited from class ch.njol.skript.util.slot.SlotWithIndex
isSameSlot
-
Constructor Details
-
InventorySlot
public InventorySlot(org.bukkit.inventory.Inventory invi, int index)
-
-
Method Details
-
getInventory
public org.bukkit.inventory.Inventory getInventory() -
getIndex
public int getIndex()Description copied from class:SlotWithIndex
Gets an index of this slot.- Specified by:
getIndex
in classSlotWithIndex
- Returns:
- Index of the slot.
-
getItem
public @Nullable org.bukkit.inventory.ItemStack getItem() -
setItem
public void setItem(@Nullable org.bukkit.inventory.ItemStack item) -
getAmount
public int getAmount() -
setAmount
public void setAmount(int amount) -
toString
- Parameters:
e
- The event to get information to. This is always null if debug == false.debug
- If true this should print more information, if false this should print what is shown to the end user- Returns:
- String representation of this object
-