public final class MenuManager extends Object
| Constructor and Description |
|---|
MenuManager(org.bukkit.plugin.java.JavaPlugin plugin) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all menus
|
boolean |
contains(String name)
Check if the menu exists
|
static List<Menu> |
getAllParentMenu(Menu menu,
UUID uuid)
Get all parent menus from a menu
|
Menu |
getMenu(String name)
Get the menu
|
Collection<String> |
getMenuNames()
Get the name of all menus
|
void |
loadMenuConfig()
Load the menu config
|
void |
openMenu(String name,
org.bukkit.entity.Player player,
String[] args,
boolean bypass)
Open the menu for the player
|
void |
openMenu(String name,
org.bukkit.entity.Player player,
String[] args,
Menu parentMenu,
boolean bypass)
Open the menu for the player
|
void |
registerMenu(me.hsgamer.hscore.config.Config config)
Register the menu
|
public static List<Menu> getAllParentMenu(Menu menu, UUID uuid)
menu - the start menuuuid - the unique idpublic void loadMenuConfig()
public void registerMenu(me.hsgamer.hscore.config.Config config)
config - the menu configpublic void clear()
public boolean contains(String name)
name - the menu namepublic void openMenu(String name, org.bukkit.entity.Player player, String[] args, boolean bypass)
name - the menu nameplayer - the playerargs - the arguments from the open commandbypass - whether the plugin ignores the permission checkpublic void openMenu(String name, org.bukkit.entity.Player player, String[] args, Menu parentMenu, boolean bypass)
name - the menu nameplayer - the playerargs - the arguments from the open commandparentMenu - the former menu that causes the player to open this menubypass - whether the plugin ignores the permission checkpublic Collection<String> getMenuNames()
Copyright © 2023. All rights reserved.