Package me.hsgamer.bettergui.manager
Class MenuManager
- java.lang.Object
-
- me.hsgamer.bettergui.manager.MenuManager
-
- All Implemented Interfaces:
Loadable
,PostEnable
public final class MenuManager extends Object implements Loadable, PostEnable
The Menu Manager
-
-
Constructor Summary
Constructors Constructor Description MenuManager(BetterGUI plugin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear all menusboolean
contains(String name)
Check if the menu existsvoid
disable()
Menu
getMenu(String name)
Get the menuCollection<String>
getMenuNames()
Get the name of all menusvoid
loadMenuConfig()
Load the menu configvoid
openMenu(String name, org.bukkit.entity.Player player, String[] args, boolean bypass)
Open the menu for the playervoid
openMenu(String name, org.bukkit.entity.Player player, String[] args, Menu parentMenu, boolean bypass)
Open the menu for the playervoid
postEnable()
void
registerMenu(File file)
Register the menuList<String>
tabCompleteMenu(String name, org.bukkit.entity.Player player, String[] args)
Get the list of the tab complete
-
-
-
Constructor Detail
-
MenuManager
public MenuManager(BetterGUI plugin)
-
-
Method Detail
-
loadMenuConfig
public void loadMenuConfig()
Load the menu config
-
registerMenu
public void registerMenu(File file)
Register the menu- Parameters:
file
- the menu file
-
clear
public void clear()
Clear all menus
-
contains
public boolean contains(String name)
Check if the menu exists- Parameters:
name
- the menu name- Returns:
- true if it exists, otherwise false
-
openMenu
public void openMenu(String name, org.bukkit.entity.Player player, String[] args, boolean bypass)
Open the menu for the player- Parameters:
name
- the menu nameplayer
- the playerargs
- the arguments from the open commandbypass
- whether the plugin ignores the permission check
-
openMenu
public void openMenu(String name, org.bukkit.entity.Player player, String[] args, Menu parentMenu, boolean bypass)
Open the menu for the player- Parameters:
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 check
-
tabCompleteMenu
public List<String> tabCompleteMenu(String name, org.bukkit.entity.Player player, String[] args)
Get the list of the tab complete- Parameters:
name
- the menu nameplayer
- the playerargs
- the arguments from the open command- Returns:
- the list of the tab complete
-
getMenuNames
public Collection<String> getMenuNames()
Get the name of all menus- Returns:
- the list of the names
-
getMenu
public Menu getMenu(String name)
Get the menu- Parameters:
name
- the menu name- Returns:
- the menu
-
postEnable
public void postEnable()
- Specified by:
postEnable
in interfacePostEnable
-
-