Class MenuHolder
java.lang.Object
com.kamikazejam.kamicommon.menu.api.MenuHolder
- All Implemented Interfaces:
InventoryHolder
- Direct Known Subclasses:
AbstractMenu
InventoryHolder with constructor parameters for making an Inventory with either a row count or an InventoryType.
Also contains a few utility methods for better utilization with the KamiCommon library.
Also contains a few utility methods for better utilization with the KamiCommon library.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMenuHolder(@NotNull MenuSize size, @Nullable VersionedComponent name) Constructs a new MenuHolder with the given size and title.MenuHolder(@NotNull MenuSize size, @Nullable String name) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidvoidbooleanintintfirstEmpty(int[] slots) intfirstEmpty(@NotNull Collection<Integer> slots) @NotNull InventoryHolder@NotNull Inventory@Nullable ItemStackgetItem(int slot) @NotNull MenuSize@Nullable InventoryintgetSize()@NotNull List<HumanEntity> inthashCode()voidreplaceTitle(@NotNull String find, @NotNull String replacement) voidsetItem(int slot, @Nullable ItemBuilder builder) void
-
Field Details
-
inventory
-
title
-
size
-
-
Constructor Details
-
Method Details
-
getInventory
- Specified by:
getInventoryin interfaceInventoryHolder
-
deleteInventory
public void deleteInventory() -
getRawInventory
-
closeAll
-
getViewers
-
getHolder
-
getSize
public int getSize() -
getMenuSize
-
getItem
-
setItem
-
setItem
-
clear
public void clear() -
firstEmpty
public int firstEmpty() -
firstEmpty
-
firstEmpty
public int firstEmpty(int[] slots) -
replaceTitle
-
equals
-
hashCode
public int hashCode()
-
MenuHolder(MenuSize, VersionedComponent)and use a VersionedComponent instead.