Interface AddonCommand


public interface AddonCommand
Used to register commands within addons
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    execute(org.bukkit.command.CommandSender sender, String[] args)
    This is like onCommand in a normal plugin.
     
    default List<String>
    tabComplete(org.bukkit.command.CommandSender sender, String[] args)
    This is like onTabComplete in a normal plugin.
     
  • Method Details

    • name

      String name()
      Returns:
      name of the command (/lumenmc|webhook addon [name])
    • type

      CommandType type()
      Returns:
      type of the command (CommandType.MONITOR or CommandType.WEBHOOK)
    • execute

      default boolean execute(org.bukkit.command.CommandSender sender, String[] args)
      This is like onCommand in a normal plugin.
      Executes the given command, returning its success.
      If false is returned, then the "usage" plugin.yml entry for this command (if defined) will be sent to the player.
      Parameters:
      sender - Source of the command
      args - Passed command arguments
      Returns:
      true if a valid command, otherwise false
    • tabComplete

      default List<String> tabComplete(org.bukkit.command.CommandSender sender, String[] args)
      This is like onTabComplete in a normal plugin.
      Requests a list of possible completions for a command argument.
      Parameters:
      sender - Source of the command. For players tab-completing a command inside of a command block, this will be the player, not the command block.
      args - The arguments passed to the command, including final partial argument to be completed
      Returns:
      A List of possible completions for the final argument, or null to default to the command executor