Interface AdditionsMenu


public interface AdditionsMenu
Custom AdditionsPlus menu class.
  • Method Details

    • getItemBySlot

      AdditionsItem getItemBySlot(int slot)
      Get the item by its slot.
      Parameters:
      slot - Slot to get item of.
      Returns:
      AdditionsItem when found, null otherwise.
    • getNoPermissionItemBySlot

      AdditionsItem getNoPermissionItemBySlot(int slot)
      Get the no-permission item by its slot.
      Parameters:
      slot - Slot to get item of.
      Returns:
      AdditionsItem when found, null otherwise.
    • getName

      String getName()
      Get the identifier of this menu.
      Returns:
      Identifier of this menu.
    • isHideInventory

      boolean isHideInventory()
      Get whether inventory hiding is enabled.
      Returns:
      True when enabled, false otherwise.
    • getPermission

      String getPermission()
      Get the permission of this menu.
      Returns:
      Permission of this menu.
    • getNoPermissionMessage

      String getNoPermissionMessage()
      Get the message that is sent when the player does not have the required permission.
      Returns:
      No permission message of this menu.
    • getOpenActions

      List<String> getOpenActions()
      Get a List of opening actions.
      Returns:
      List of opening actions.
    • getCloseActions

      List<String> getCloseActions()
      Get a List of closing actions.
      Returns:
      List of closing actions.
    • getCooldown

      long getCooldown()
      Get the cooldown of this menu in ticks.
      Returns:
      Cooldown in ticks.
    • getCooldownMessage

      String getCooldownMessage()
      Get the message that is sent when the menu is on cooldown for a player.
      Returns:
      Cooldown message of this menu.
    • getTitle

      String getTitle()
      Get the menu title.
      Returns:
      Title of the menu.
    • getOpenCommand

      String getOpenCommand()
      Get the open command of this menu.
      Returns:
      Open command of this menu.
    • isRegisterOpenCommand

      boolean isRegisterOpenCommand()
      Get whether the open command should be registered to Bukkit.
      Returns:
      True when enabled, false otherwise.
    • getSize

      String getSize()
      Get the size of this custom menu. Size could either be an Integer, a 'CRAFTING_TABLE', or any other InventoryType.
      Returns:
      The size of the menu.
    • isCancelClick

      boolean isCancelClick()
      Get whether cancel click is enabled.
      Returns:
      True when enabled, false otherwise.
    • isCancelClosing

      boolean isCancelClosing()
      Get whether cancel closing is enabled.
      Returns:
      True when enabled, false otherwise.
    • getStaticSlots

      HashMap<Integer,org.bukkit.inventory.ItemStack> getStaticSlots()
      Get a HashMap with the Integer slot and the corresponding ItemStack.
      Returns:
      HashMap with the slots and its items.
    • getItems

      List<AdditionsItem> getItems()
      Get a List of AdditionsItem that are in this menu.
      Returns:
      List of AdditionsItem.
    • openMenu

      void openMenu(org.bukkit.entity.Player player, boolean performOpenActions)
      Open the custom menu for a player.
      Parameters:
      player - Player to open for.
      performOpenActions - Whether to execute the open actions.
    • openMenu

      void openMenu(org.bukkit.entity.Player player, boolean performOpenActions, boolean skipPermissionCheck, boolean skipCooldown)
      Open the custom menu for a player.
      Parameters:
      player - Player to open for.
      performOpenActions - Whether to execute the open actions.
      skipPermissionCheck - Whether to skip the permission check.
      skipCooldown - Whether to skip the cooldown check.