Class MenuManager

    • 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 name
        player - the player
        args - the arguments from the open command
        bypass - 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 name
        player - the player
        args - the arguments from the open command
        parentMenu - the former menu that causes the player to open this menu
        bypass - 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 name
        player - the player
        args - 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
      • disable

        public void disable()
        Specified by:
        disable in interface Loadable