public class AASymbolicCommand
extends org.bukkit.command.Command
implements org.bukkit.command.PluginIdentifiableCommand
Constructor and Description |
---|
AASymbolicCommand(java.lang.String name,
org.bukkit.plugin.Plugin owner,
java.lang.String description,
java.lang.String permission) |
Modifier and Type | Method and Description |
---|---|
boolean |
execute(org.bukkit.command.CommandSender sender,
java.lang.String commandLabel,
java.lang.String[] args)
Executes the command, returning its success
|
org.bukkit.command.CommandExecutor |
getExecutor()
Gets the
CommandExecutor associated with this command |
org.bukkit.plugin.Plugin |
getPlugin()
Gets the owner of this PluginCommand
|
org.bukkit.command.TabCompleter |
getTabCompleter()
Gets the
TabCompleter associated with this command. |
void |
setExecutor(org.bukkit.command.CommandExecutor executor)
Sets the
CommandExecutor to run when parsing this command |
void |
setTabCompleter(org.bukkit.command.TabCompleter completer)
Sets the
TabCompleter to run when tab-completing this command. |
java.util.List<java.lang.String> |
tabComplete(org.bukkit.command.CommandSender sender,
java.lang.String alias,
java.lang.String[] args) |
java.lang.String |
toString() |
broadcastCommandMessage, broadcastCommandMessage, getAliases, getDescription, getLabel, getName, getPermission, getPermissionMessage, getUsage, isRegistered, register, setAliases, setDescription, setLabel, setName, setPermission, setPermissionMessage, setUsage, tabComplete, testPermission, testPermissionSilent, unregister
public AASymbolicCommand(java.lang.String name, org.bukkit.plugin.Plugin owner, java.lang.String description, java.lang.String permission)
public boolean execute(org.bukkit.command.CommandSender sender, java.lang.String commandLabel, java.lang.String[] args)
execute
in class org.bukkit.command.Command
sender
- Source object which is executing this commandcommandLabel
- The alias of the command usedargs
- All arguments passed to the command, split via ' 'public void setExecutor(org.bukkit.command.CommandExecutor executor)
CommandExecutor
to run when parsing this commandexecutor
- New executor to runpublic org.bukkit.command.CommandExecutor getExecutor()
CommandExecutor
associated with this commandpublic void setTabCompleter(org.bukkit.command.TabCompleter completer)
TabCompleter
to run when tab-completing this command.
If no TabCompleter is specified, and the command's executor implements TabCompleter, then the executor will be used for tab completion.
completer
- New tab completerpublic org.bukkit.command.TabCompleter getTabCompleter()
TabCompleter
associated with this command.public org.bukkit.plugin.Plugin getPlugin()
getPlugin
in interface org.bukkit.command.PluginIdentifiableCommand
public java.util.List<java.lang.String> tabComplete(org.bukkit.command.CommandSender sender, java.lang.String alias, java.lang.String[] args) throws org.bukkit.command.CommandException, java.lang.IllegalArgumentException
Delegates to the tab completer if present.
If it is not present or returns null, will delegate to the current
command executor if it implements TabCompleter
. If a non-null
list has not been found, will default to standard player name
completion in Command.tabComplete(CommandSender, String, String[])
.
This method does not consider permissions.
tabComplete
in class org.bukkit.command.Command
org.bukkit.command.CommandException
- if the completer or executor throw an
exception during the process of tab-completing.java.lang.IllegalArgumentException
- if sender, alias, or args is nullpublic java.lang.String toString()
toString
in class org.bukkit.command.Command