Class MenusCategorySelectionMenu
java.lang.Object
ua.mcchickenstudio.opencreative.menus.AbstractMenu
ua.mcchickenstudio.opencreative.coding.menus.blocks.MenusCategorySelectionMenu
- All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder, InventoryMenu
- Direct Known Subclasses:
BlocksCategorySelectionMenu, EventValuesCategorySelectionMenu
MenusCategorySelectionMenu
This class represents a menu for selecting menus category and opening a content filtered by menus category selection menu.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.bukkit.Materialprotected ContentWithMenusCategoryMenu<?> protected final Objectprotected final booleanprotected final Stringprotected final org.bukkit.inventory.ItemStackprotected final List<MenusCategory> protected final org.bukkit.entity.PlayerFields inherited from class AbstractMenu
AIR_ITEM, creationTime, DECORATION_ITEM, DECORATION_PANE_ITEM, DISABLED_ITEM, inventory, NO_PERMS_ITEMModifier and TypeFieldDescriptionprotected final org.bukkit.inventory.ItemStackprotected final longprotected final org.bukkit.inventory.ItemStackprotected final org.bukkit.inventory.ItemStackprotected final org.bukkit.inventory.ItemStackprotected org.bukkit.inventory.Inventoryprotected final org.bukkit.inventory.ItemStack -
Constructor Summary
ConstructorsConstructorDescriptionMenusCategorySelectionMenu(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.inventory.ItemStack mainItem, @NotNull org.bukkit.Material additionalPane, @NotNull Collection<MenusCategory> menusCategories, @NotNull String title, @NotNull String mainCategory, @NotNull Object frequency) -
Method Summary
Modifier and TypeMethodDescriptionvoidfillItems(org.bukkit.entity.Player player) abstract @NotNull ContentWithMenusCategoryMenu<?> getContentBrowserMenu(Object frequency) voidonClick(@NotNull org.bukkit.event.inventory.InventoryClickEvent event) Executes when player clicks in inventory.voidonOpen(@NotNull org.bukkit.event.inventory.InventoryOpenEvent event) Executes when player opens inventory and sees it first time.Methods inherited from class AbstractMenu
getCreationTime, getInventory, getItem, getRows, getSize, getTitle, isClickedInMenuSlots, isNotEmpty, isPlayerClicked, open, reverse, setItem, setItem, setRows, setTitleModifier and TypeMethodDescriptionlongReturns the creation time of menu in milliseconds of Unix format.@NotNull org.bukkit.inventory.Inventory@NotNull org.bukkit.inventory.ItemStackgetItem(int slot) intgetRows()intgetSize()getTitle()protected final booleanisClickedInMenuSlots(org.bukkit.event.inventory.InventoryClickEvent event) protected booleanisNotEmpty(org.bukkit.inventory.ItemStack item) protected final booleanisPlayerClicked(org.bukkit.event.inventory.InventoryClickEvent event) voidopen(@NotNull org.bukkit.entity.Player player) Opens the inventory for player.protected intreverse(int slot) voidsetItem(int slot, org.bukkit.inventory.ItemStack item) voidsetItem(org.bukkit.inventory.ItemStack item, int... slots) protected voidsetRows(int rows) voidMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface InventoryMenu
destroy, onClose
-
Field Details
-
player
protected final org.bukkit.entity.Player player -
additionalPane
protected final org.bukkit.Material additionalPane -
mainItem
protected final org.bukkit.inventory.ItemStack mainItem -
mainCategory
-
frequency
-
legacy
protected final boolean legacy -
contentMenu
-
-
Constructor Details
-
MenusCategorySelectionMenu
public MenusCategorySelectionMenu(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.inventory.ItemStack mainItem, @NotNull @NotNull org.bukkit.Material additionalPane, @NotNull @NotNull Collection<MenusCategory> menusCategories, @NotNull @NotNull String title, @NotNull @NotNull String mainCategory, @NotNull @NotNull Object frequency)
-
-
Method Details
-
getContentBrowserMenu
@NotNull public abstract @NotNull ContentWithMenusCategoryMenu<?> getContentBrowserMenu(Object frequency) -
fillItems
public void fillItems(org.bukkit.entity.Player player) - Specified by:
fillItemsin classAbstractMenu
-
onClick
public void onClick(@NotNull @NotNull org.bukkit.event.inventory.InventoryClickEvent event) Description copied from interface:InventoryMenuExecutes when player clicks in inventory.- Specified by:
onClickin interfaceInventoryMenu- Specified by:
onClickin classAbstractMenu- Parameters:
event- event of click in inventory.
-
onOpen
public void onOpen(@NotNull @NotNull org.bukkit.event.inventory.InventoryOpenEvent event) Description copied from interface:InventoryMenuExecutes when player opens inventory and sees it first time. Useful for playing sounds or setting items.- Specified by:
onOpenin interfaceInventoryMenu- Specified by:
onOpenin classAbstractMenu- Parameters:
event- event of inventory open.
-