Interface Menu

All Superinterfaces:
org.bukkit.inventory.InventoryHolder
All Known Implementing Classes:
PagedMenu, SimpleMenu, TemplatedMenu

public interface Menu extends org.bukkit.inventory.InventoryHolder
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Get a selector
    default void
    Close the menu
    @NotNull Button
    getButton(int slot)
    Get the button at the given slot
    Get the ID of the menu
    Get the options of the menu
    @NotNull MenuViewer
    Get the viewer of the menu
    default void
    Open the menu
    void
    open(boolean clearHistory, boolean pushToHistory)
    Open the menu
    void
    runActions(@NotNull Menu.Action action, @NotNull MenuViewer viewer)
    Run the actions associated with the given action (type)
    void
    setButton(int slot, @NotNull Button button)
    Set the button at the given slot
    default void
    updateButton(int slot, Function<@NotNull Button,@NotNull Button> updater)
    Update the button at the given slot

    Methods inherited from interface org.bukkit.inventory.InventoryHolder

    getInventory
  • Method Details

    • builder

      static MenuBuilderSelector builder()
      Get a selector
      Returns:
      a builder selector
    • runActions

      void runActions(@NotNull @NotNull Menu.Action action, @NotNull @NotNull MenuViewer viewer)
      Run the actions associated with the given action (type)
      Parameters:
      action - the action (type) to run
      viewer - the viewer that triggered the action
    • setButton

      void setButton(int slot, @NotNull @NotNull Button button)
      Set the button at the given slot
      Parameters:
      slot - the slot to set the button at
      button - the button to set
    • getButton

      @NotNull @NotNull Button getButton(int slot)
      Get the button at the given slot
      Parameters:
      slot - the slot to get the button from
      Returns:
      the button at the given slot
    • updateButton

      default void updateButton(int slot, Function<@NotNull Button,@NotNull Button> updater)
      Update the button at the given slot
      Parameters:
      slot - the slot to update the button at
      updater - the function to update the button
    • open

      default void open()
      Open the menu
    • close

      default void close()
      Close the menu
    • open

      void open(boolean clearHistory, boolean pushToHistory)
      Open the menu
      Parameters:
      clearHistory - whether to clear the history
      pushToHistory - whether to push the menu to the history
    • getViewer

      @NotNull @NotNull MenuViewer getViewer()
      Get the viewer of the menu
      Returns:
      the viewer of the menu
    • getId

      String getId()
      Get the ID of the menu
      Returns:
      the ID of the menu
    • getOptions

      MenuOptions getOptions()
      Get the options of the menu
      Returns:
      the options of the menu