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

public interface MenuView<C,M extends Menu<C>> extends org.bukkit.inventory.InventoryHolder
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 Type
    Method
    Description
    @NotNull Capacity
    Returns the resolved capacity.
    @NotNull Content
    Returns the current content.
    @NotNull DataRegistry
    Returns the per-view data registry.
    @Nullable org.bukkit.inventory.Inventory
     
    boolean
    Returns whether the view is currently open.
    @NotNull Lotus
    Returns the Lotus runtime that owns this view.
    Returns the menu template behind this view.
    void
    Rebuilds the resolved menu state and reapplies it to the live inventory.
    Returns the title of the view.
    default @NotNull org.bukkit.event.inventory.InventoryType
    Returns the inventory type used by this view.
    @NotNull org.bukkit.entity.Player
    Returns the player viewing this menu.
  • Method Details

    • lotus

      @NotNull @NotNull Lotus lotus()
      Returns the Lotus runtime that owns this view.
    • title

      @NotNull C 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

      @NotNull @NotNull DataRegistry data()
      Returns the per-view data registry.
    • content

      @NotNull @NotNull Content content()
      Returns the current content.
    • capacity

      @NotNull @NotNull Capacity capacity()
      Returns the resolved capacity.
    • getInventory

      @Nullable @Nullable org.bukkit.inventory.Inventory getInventory()
      Specified by:
      getInventory in interface org.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.