Interface Menu<C>

Type Parameters:
C - the title component type — Component on Paper, String on Spigot
All Known Subinterfaces:
InteractiveMenu<C>

public interface Menu<C>
Defines the layout of a menu.

A menu describes its title, size, and content for a specific MenuView.

  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Capacity
    capacity(@NotNull MenuView<C,?> view)
    Returns the capacity for the current view.
    @NotNull Content
    content(@NotNull MenuView<C,?> view)
    Builds the content for the current view.
    default @NotNull String
    Returns the menu name used for registration and logging.
    title(@NotNull MenuView<C,?> view)
    Returns the title for the current view.
    default @NotNull org.bukkit.event.inventory.InventoryType
    Returns the Bukkit inventory type used by this menu.
  • Method Details

    • title

      @NotNull C title(@NotNull @NotNull MenuView<C,?> view)
      Returns the title for the current view.
    • capacity

      @NotNull @NotNull Capacity capacity(@NotNull @NotNull MenuView<C,?> view)
      Returns the capacity for the current view.
    • content

      @NotNull @NotNull Content content(@NotNull @NotNull MenuView<C,?> view)
      Builds the content for the current view.
    • name

      @NotNull default @NotNull String name()
      Returns the menu name used for registration and logging.
    • type

      @NotNull default @NotNull org.bukkit.event.inventory.InventoryType type()
      Returns the Bukkit inventory type used by this menu.