Package dev.aurelium.auraskills.api.menu
Interface MenuManager
public interface MenuManager
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Provides access to aMenuBuilder
for building a Slate menu.void
openLevelProgressionMenu
(org.bukkit.entity.Player player, Skill skill) Opens the AuraSkills level progression menu for a player.void
Opens a menu for a player with the given name.void
Opens a menu for a player with the given name and properties.void
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
Provides access to aMenuBuilder
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 menumenu
- a consumer for the menu builder
-
openMenu
Opens a menu for a player with the given name.- Parameters:
player
- the player to open the menu forname
- the name of the menu as registered in Slate
-
openMenu
Opens a menu for a player with the given name and properties.- Parameters:
player
- the player to open the menu forname
- the name of the menu as registered in Slateproperties
- 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 forname
- the name of the menu as registered in Slateproperties
- the properties to pass to the menupage
- the page to open the menu to
-
openLevelProgressionMenu
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 forskill
- the skill to open to
-