Package dev.jorel.commandapi
Class CommandAPICommand
java.lang.Object
dev.jorel.commandapi.ExecutableCommand<CommandAPICommand,org.bukkit.command.CommandSender>
dev.jorel.commandapi.AbstractCommandAPICommand<CommandAPICommand,Argument<?>,org.bukkit.command.CommandSender>
dev.jorel.commandapi.CommandAPICommand
- All Implemented Interfaces:
BukkitExecutable<CommandAPICommand>,ChainableBuilder<CommandAPICommand>,PlatformExecutable<CommandAPICommand,org.bukkit.command.CommandSender>
public class CommandAPICommand
extends AbstractCommandAPICommand<CommandAPICommand,Argument<?>,org.bukkit.command.CommandSender>
implements BukkitExecutable<CommandAPICommand>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> Fields inherited from class dev.jorel.commandapi.AbstractCommandAPICommand
arguments, isConverted, subcommandsFields inherited from class dev.jorel.commandapi.ExecutableCommand
meta -
Constructor Summary
ConstructorsConstructorDescriptionCommandAPICommand(dev.jorel.commandapi.CommandMetaData<org.bukkit.command.CommandSender> meta) CommandAPICommand(String commandName) -
Method Summary
Modifier and TypeMethodDescriptionCommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> instance()protected CommandAPICommandnewConcreteCommandAPICommand(dev.jorel.commandapi.CommandMetaData<org.bukkit.command.CommandSender> metaData) voidRegisters the command with a given namespacevoidregister(org.bukkit.plugin.java.JavaPlugin plugin) Registers this command with a givenJavaPlugininstancevoidsetExecutor(CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> arg0) withHelp(org.bukkit.help.HelpTopic helpTopic) Sets theHelpTopicfor this command.Methods inherited from class dev.jorel.commandapi.AbstractCommandAPICommand
copy, getArguments, getSubcommands, isConverted, setArguments, setSubcommands, withArguments, withArguments, withOptionalArguments, withOptionalArguments, withSubcommand, withSubcommandsMethods inherited from class dev.jorel.commandapi.ExecutableCommand
getAliases, getFullDescription, getName, getPermission, getRequirements, getShortDescription, getUsage, override, register, setAliases, setPermission, setRequirements, withAliases, withFullDescription, withHelp, withoutPermission, withoutPermission, withPermission, withPermission, withRequirement, withShortDescription, withUsageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.jorel.commandapi.BukkitExecutable
executes, executes, executes, executes, executesCommandBlock, executesCommandBlock, executesCommandBlock, executesCommandBlock, executesConsole, executesConsole, executesConsole, executesConsole, executesEntity, executesEntity, executesEntity, executesEntity, executesFeedbackForwarding, executesFeedbackForwarding, executesFeedbackForwarding, executesFeedbackForwarding, executesNative, executesNative, executesNative, executesNative, executesPlayer, executesPlayer, executesPlayer, executesPlayer, executesProxy, executesProxy, executesProxy, executesProxy, executesRemoteConsole, executesRemoteConsole, executesRemoteConsole, executesRemoteConsoleMethods inherited from interface dev.jorel.commandapi.PlatformExecutable
getExecutor
-
Field Details
-
executor
protected CommandAPIExecutor<org.bukkit.command.CommandSender,AbstractCommandSender<? extends org.bukkit.command.CommandSender>> executor
-
-
Constructor Details
-
CommandAPICommand
public CommandAPICommand(dev.jorel.commandapi.CommandMetaData<org.bukkit.command.CommandSender> meta) -
CommandAPICommand
-
-
Method Details
-
newConcreteCommandAPICommand
protected CommandAPICommand newConcreteCommandAPICommand(dev.jorel.commandapi.CommandMetaData<org.bukkit.command.CommandSender> metaData) - Specified by:
newConcreteCommandAPICommandin classAbstractCommandAPICommand<CommandAPICommand,Argument<?>, org.bukkit.command.CommandSender>
-
instance
- Specified by:
instancein interfaceChainableBuilder<CommandAPICommand>
-
withHelp
Sets theHelpTopicfor this command. Using this method will override any declared short description, full description or usage description provided via the following methods:- Parameters:
helpTopic- the help topic to use for this command- Returns:
- this command builder
-
register
Registers the command with a given namespace- Overrides:
registerin classAbstractCommandAPICommand<CommandAPICommand,Argument<?>, org.bukkit.command.CommandSender> - Parameters:
namespace- The namespace of this command. This cannot be null or empty
-
register
public void register(org.bukkit.plugin.java.JavaPlugin plugin) Registers this command with a givenJavaPlugininstance- Parameters:
plugin- The plugin instance used to determine this command's namespace
-
getExecutor
public CommandAPIExecutor<org.bukkit.command.CommandSender,AbstractCommandSender<? extends org.bukkit.command.CommandSender>> getExecutor() -
setExecutor
public void setExecutor(CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> arg0) -
clearExecutors
-