Package studio.mevera.lotus.api.menu
Interface MenuView<C,M extends Menu<C>>
- Type Parameters:
C- the type representing the title.M- the menu type
- All Superinterfaces:
org.bukkit.inventory.InventoryHolder
- All Known Implementing Classes:
BaseMenuView
Live view of a
Menu for one player.
A menu view holds the resolved inventory state, content, and per-view data.
-
Method Summary
Modifier and TypeMethodDescription@NotNull Capacitycapacity()Returns the resolved capacity.@NotNull Contentcontent()Returns the current content.@NotNull DataRegistrydata()Returns the per-view data registry.@Nullable org.bukkit.inventory.InventorybooleanisOpen()Returns whether the view is currently open.@NotNull Lotuslotus()Returns the Lotus runtime that owns this view.menu()Returns the menu template behind this view.voidrefresh()Rebuilds the resolved menu state and reapplies it to the live inventory.title()Returns the title of the view.default @NotNull org.bukkit.event.inventory.InventoryTypetype()Returns the inventory type used by this view.@NotNull org.bukkit.entity.Playerviewer()Returns the player viewing this menu.
-
Method Details
-
lotus
Returns the Lotus runtime that owns this view. -
title
Returns the title of the view.- Returns:
- the title of the view.
-
viewer
@NotNull @NotNull org.bukkit.entity.Player viewer()Returns the player viewing this menu. -
data
Returns the per-view data registry. -
content
Returns the current content. -
capacity
Returns the resolved capacity. -
getInventory
@Nullable @Nullable org.bukkit.inventory.Inventory getInventory()- Specified by:
getInventoryin interfaceorg.bukkit.inventory.InventoryHolder
-
isOpen
boolean isOpen()Returns whether the view is currently open. -
refresh
void refresh()Rebuilds the resolved menu state and reapplies it to the live inventory.Implementations may recreate the inventory when structural properties such as title, type, or capacity change.
-
type
@NotNull default @NotNull org.bukkit.event.inventory.InventoryType type()Returns the inventory type used by this view.
-