Interface MenuManager


public interface MenuManager
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    buildMenu(String name, Consumer<dev.aurelium.slate.builder.MenuBuilder> menu)
    Provides access to a MenuBuilder for building a Slate menu.
    void
    openLevelProgressionMenu(org.bukkit.entity.Player player, Skill skill)
    Opens the AuraSkills level progression menu for a player.
    void
    openMenu(org.bukkit.entity.Player player, String name)
    Opens a menu for a player with the given name.
    void
    openMenu(org.bukkit.entity.Player player, String name, Map<String,Object> properties)
    Opens a menu for a player with the given name and properties.
    void
    openMenu(org.bukkit.entity.Player player, String name, Map<String,Object> properties, int page)
    Opens a menu for a player with the given name, properties, and page.
    <T> void
    registerContext(String key, Class<T> contextClass, ContextParser<T> parser)
     
  • Method Details

    • buildMenu

      void buildMenu(String name, Consumer<dev.aurelium.slate.builder.MenuBuilder> menu)
      Provides access to a MenuBuilder for building a Slate menu. If the name is not an AuraSkills default menu, a new MenuBuilder is created and registered to Slate. Otherwise, the menu builder for an existing menu will be provided to extend an existing menu.
      Parameters:
      name - the name of the menu
      menu - a consumer for the menu builder
    • openMenu

      void openMenu(org.bukkit.entity.Player player, String name)
      Opens a menu for a player with the given name.
      Parameters:
      player - the player to open the menu for
      name - the name of the menu as registered in Slate
    • openMenu

      void openMenu(org.bukkit.entity.Player player, String name, Map<String,Object> properties)
      Opens a menu for a player with the given name and properties.
      Parameters:
      player - the player to open the menu for
      name - the name of the menu as registered in Slate
      properties - the properties to pass to the menu
    • openMenu

      void openMenu(org.bukkit.entity.Player player, String name, Map<String,Object> properties, int page)
      Opens a menu for a player with the given name, properties, and page.
      Parameters:
      player - the player to open the menu for
      name - the name of the menu as registered in Slate
      properties - the properties to pass to the menu
      page - the page to open the menu to
    • openLevelProgressionMenu

      void openLevelProgressionMenu(org.bukkit.entity.Player player, Skill skill)
      Opens the AuraSkills level progression menu for a player. Required properties and the correct page to open to are automatically handled by this method versus the generic openMenu methods.
      Parameters:
      player - the player to open the menu for
      skill - the skill to open to
    • registerContext

      <T> void registerContext(String key, Class<T> contextClass, ContextParser<T> parser)