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 AbstractCommandAPICommand
arguments, isConverted, namespace, subcommandsFields inherited from class 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 AbstractCommandAPICommand
copy, getArguments, getSubcommands, isConverted, setArguments, setSubcommands, withArguments, withArguments, withOptionalArguments, withOptionalArguments, withSubcommand, withSubcommandsMethods inherited from class 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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, executesRemoteConsoleModifier and TypeMethodDescriptiondefault CommandAPICommandexecutes(CommandExecutionInfo executor, ExecutorType... types) Adds an executor to the current command builderdefault CommandAPICommandexecutes(CommandExecutor executor, ExecutorType... types) Adds an executor to the current command builderdefault CommandAPICommandexecutes(ResultingCommandExecutionInfo executor, ExecutorType... types) Adds an executor to the current command builderdefault CommandAPICommandexecutes(ResultingCommandExecutor executor, ExecutorType... types) Adds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandexecutesConsole(ConsoleCommandExecutor executor) Adds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandexecutesEntity(EntityCommandExecutor executor) Adds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandexecutesEntity(EntityResultingCommandExecutor executor) Adds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandexecutesNative(NativeCommandExecutor executor) Adds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandexecutesNative(NativeResultingCommandExecutor executor) Adds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandexecutesPlayer(PlayerCommandExecutor executor) Adds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandexecutesPlayer(PlayerResultingCommandExecutor executor) Adds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandexecutesProxy(ProxyCommandExecutor executor) Adds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandexecutesProxy(ProxyResultingCommandExecutor executor) Adds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderdefault CommandAPICommandAdds an executor to the current command builderMethods inherited from interface 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
-