Package cloud.lumenvm.api
Interface AddonCommand
public interface AddonCommand
Used to register commands within addons
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanThis is like onCommand in a normal plugin.name()tabComplete(org.bukkit.command.CommandSender sender, String[] args) This is like onTabComplete in a normal plugin.type()
-
Method Details
-
name
String name()- Returns:
- name of the command (/lumenmc|webhook addon [name])
-
type
CommandType type()- Returns:
- type of the command (
CommandType.MONITORorCommandType.WEBHOOK)
-
execute
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 commandargs- Passed command arguments- Returns:
- true if a valid command, otherwise false
-
tabComplete
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
-