Interface MenuManager


public sealed interface MenuManager
Interface for a Menu Manager that provides methods for managing menus in the bot application.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull EventManager
    Gets the EventManager associated with this MenuManager.
    @Nullable Menu
    Gets a Menu registered with this MenuManager by its name.
    @NotNull @Unmodifiable Collection<Menu>
    Gets all the Menus registered with this MenuManager.
    static @NotNull MenuManager
     
    void
    registerMenu(@NotNull Menu menu)
    Registers a new Menu with this MenuManager.
    void
    unregisterMenu(int menuId)
    Unregisters a Menu from this MenuManager by its ID.
  • Method Details

    • newMenuManager

      @Internal @NotNull static @NotNull MenuManager newMenuManager()
    • getEventNode

      @NotNull @NotNull EventManager getEventNode()
      Gets the EventManager associated with this MenuManager.
      Returns:
      the EventManager associated with this MenuManager
    • registerMenu

      void registerMenu(@NotNull @NotNull Menu menu)
      Registers a new Menu with this MenuManager.
      Parameters:
      menu - the Menu to be registered
    • getMenus

      @NotNull @NotNull @Unmodifiable Collection<Menu> getMenus()
      Gets all the Menus registered with this MenuManager.
      Returns:
      a collection of all the Menus registered with this MenuManager
    • getMenu

      @Nullable @Nullable Menu getMenu(String name)
      Gets a Menu registered with this MenuManager by its name.
      Parameters:
      name - the name of the Menu
      Returns:
      the Menu with the given name, or null if no such Menu is registered
    • unregisterMenu

      void unregisterMenu(int menuId)
      Unregisters a Menu from this MenuManager by its ID.
      Parameters:
      menuId - the ID of the Menu to be unregistered