Class BaseMenu

  • Direct Known Subclasses:
    BaseInventoryMenu

    public abstract class BaseMenu
    extends StandardMenu
    A StandardMenu with some basic features. Included: - open-action: The action to run when the menu is opened. Need to be called manually. - close-action: The action to run when the menu is closed. Need to be called manually. - view-requirement: The requirement to view the menu - close-requirement: The requirement to close the menu. Need to be called manually. - permission: The permission to view the menu - argument-processor: The argument processor for the menu - command: The command to open the menu
    • Field Detail

      • openActionApplier

        protected final ActionApplier openActionApplier
      • closeActionApplier

        protected final ActionApplier closeActionApplier
      • permissions

        protected final List<org.bukkit.permissions.Permission> permissions
    • Constructor Detail

      • BaseMenu

        protected BaseMenu​(Config config)
    • Method Detail

      • createChecked

        protected abstract boolean createChecked​(org.bukkit.entity.Player player,
                                                 String[] args,
                                                 boolean bypass)
        Create the menu after checking the conditions
        Parameters:
        player - the player
        args - the arguments
        bypass - if the requirement should be bypassed
        Returns:
        true if the menu is created
        See Also:
        create(Player, String[], boolean)
      • create

        public boolean create​(org.bukkit.entity.Player player,
                              String[] args,
                              boolean bypass)
        Description copied from class: Menu
        Called when opening the menu for the player
        Specified by:
        create in class Menu
        Parameters:
        player - the player involved in
        args - the arguments from the open command
        bypass - whether the plugin ignores the permission check
        Returns:
        Whether it's successful
      • tabComplete

        public List<String> tabComplete​(org.bukkit.entity.Player player,
                                        String[] args)
        Description copied from class: Menu
        Called when the player hit TAB when typing the command to open the menu
        Overrides:
        tabComplete in class Menu
        Parameters:
        player - the player involved in
        args - the arguments from the open command
        Returns:
        the list of suggestions