Interface CommandManager


public interface CommandManager
AdditionsPlus custom command manager. Also manages cooldowns of items and menus.
  • Method Details

    • getLastCooldownTime

      long getLastCooldownTime(ActionSender sender, AdditionsCommand command)
      Get the command cooldown of a sender.
      Parameters:
      sender - Sender of the menu.
      command - AdditionsCommand to get cooldown of.
      Returns:
      Long last cooldown of the sender.
    • getCooldown

      long getCooldown(ActionSender sender, AdditionsCommand command)
      Get the command cooldown of a sender.
      Parameters:
      sender - Sender of the menu.
      command - AdditionsCommand to get cooldown of.
      Returns:
      Long cooldown of the sender.
    • setCooldown

      void setCooldown(ActionSender sender, AdditionsCommand command)
      Set the command cooldown of a sender.
      Parameters:
      sender - Sender of the command.
      command - AdditionsCommand to set cooldown of.
    • getLastItemCooldownTime

      long getLastItemCooldownTime(ActionSender sender, AdditionsItem item)
      Get the last item cooldown of a sender.
      Parameters:
      sender - Sender of the menu.
      item - AdditionsItem to get cooldown of.
      Returns:
      Long last cooldown of the sender.
    • getItemCooldown

      long getItemCooldown(ActionSender sender, AdditionsItem item)
      Get the item cooldown of a sender.
      Parameters:
      sender - Sender of the menu.
      item - AdditionsItem to get cooldown of.
      Returns:
      Long cooldown of the sender.
    • setItemCooldown

      void setItemCooldown(ActionSender sender, AdditionsItem item)
      Set the item cooldown of a sender.
      Parameters:
      sender - Sender of the menu.
      item - AdditionsItem to set cooldown of.
    • getLastMenuCooldownTime

      long getLastMenuCooldownTime(ActionSender sender, AdditionsMenu menu)
      Get the last menu cooldown of a sender.
      Parameters:
      sender - Sender of the menu.
      menu - AdditionsMenu to get cooldown of.
      Returns:
      Long last cooldown of the sender.
    • getMenuCooldown

      long getMenuCooldown(ActionSender sender, AdditionsMenu menu)
      Get the menu cooldown of a sender.
      Parameters:
      sender - Sender of the menu.
      menu - AdditionsMenu to get cooldown of.
      Returns:
      Long cooldown of the sender.
    • setMenuCooldown

      void setMenuCooldown(ActionSender sender, AdditionsMenu menu)
      Set the menu cooldown of a sender.
      Parameters:
      sender - Sender of the menu.
      menu - AdditionsMenu to set cooldown of.
    • checkCommandEvent

      void checkCommandEvent(org.bukkit.event.Cancellable event, String message, ActionSender sender)
      Check the command event for custom commands.
      Parameters:
      event - Bukkit event to check.
      message - Command string as executed by the sender.
      sender - Sender of the command.
    • checkCommand

      int checkCommand(String command, String message, ActionSender sender)
      Check if the executed command is formatted correctly.
      Parameters:
      command - Name of the command.
      message - Command string as executed by the sender.
      sender - Sender of the command.
      Returns:
      1 if succeeded, error code otherwise.
    • performCommand

      void performCommand(String command, ActionSender sender, String message)
      Perform a custom command for a sender.
      Parameters:
      command - Name of the command.
      sender - Sender of the command.
      message - Command string as executed by the sender.