Package ch.njol.skript.bukkitutil
Class InventoryUtils
java.lang.Object
ch.njol.skript.bukkitutil.InventoryUtils
Utilities for inventories.
In newer versions (1.21+), InventoryView is an interface instead of an abstract class
Directing calling InventoryView#getTitle on 1.20.6 and below results in an IncompatibleClassChangeError
as an interface, not an abstract class, is expected.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Integer
convertSlot
(org.bukkit.inventory.InventoryView inventoryView, int rawSlot) static @Nullable org.bukkit.inventory.Inventory
getBottomInventory
(org.bukkit.inventory.InventoryView inventoryView) static @Nullable org.bukkit.inventory.Inventory
getInventory
(org.bukkit.inventory.InventoryView inventoryView, int rawSlot) static @Nullable String
getTitle
(org.bukkit.inventory.InventoryView inventoryView) static @Nullable org.bukkit.inventory.Inventory
getTopInventory
(org.bukkit.inventory.InventoryView inventoryView)
-
Constructor Details
-
InventoryUtils
public InventoryUtils()
-
-
Method Details
-
getTitle
- See Also:
-
getInventory
@Nullable public static @Nullable org.bukkit.inventory.Inventory getInventory(org.bukkit.inventory.InventoryView inventoryView, int rawSlot) - See Also:
-
convertSlot
@Nullable public static @Nullable Integer convertSlot(org.bukkit.inventory.InventoryView inventoryView, int rawSlot) - See Also:
-
getTopInventory
@Nullable public static @Nullable org.bukkit.inventory.Inventory getTopInventory(org.bukkit.inventory.InventoryView inventoryView) - See Also:
-
getBottomInventory
@Nullable public static @Nullable org.bukkit.inventory.Inventory getBottomInventory(org.bukkit.inventory.InventoryView inventoryView) - See Also:
-