CommandAPI 9.7.0
An API for the command UI introduced in Minecraft 1.13
|
Public Member Functions | |
CommandAPICommand (CommandMetaData< CommandSender > meta) | |
CommandAPICommand (String commandName) | |
CommandAPICommand | instance () |
CommandAPICommand | withHelp (HelpTopic helpTopic) |
Sets the HelpTopic for this command. More... | |
void | register (String namespace) |
Registers the command with a given namespace. More... | |
void | register (JavaPlugin plugin) |
Registers this command with a given JavaPlugin instance. More... | |
boolean | isConverted () |
Returns whether this command is an automatically converted command. More... | |
Impl | withArguments (List< Argument > args) |
Appends the arguments to the current command builder. More... | |
final Impl | withArguments (Argument... args) |
Appends the argument(s) to the current command builder. More... | |
Impl | withOptionalArguments (List< Argument > args) |
Appends the optional arguments to the current command builder. More... | |
final Impl | withOptionalArguments (Argument... args) |
Appends the optional arguments to the current command builder. More... | |
Impl | withSubcommand (Impl subcommand) |
Adds a subcommand to this command builder. More... | |
Impl | withSubcommands ( @SuppressWarnings("unchecked") Impl... subcommands) |
Adds subcommands to this command builder. More... | |
List< Argument > | getArguments () |
Returns the list of arguments that this command has. More... | |
void | setArguments (List< Argument > args) |
Sets the arguments that this command has. More... | |
List< Impl > | getSubcommands () |
Returns the list of subcommands that this command has. More... | |
void | setSubcommands (List< Impl > subcommands) |
Sets the list of subcommands that this command has. More... | |
Impl | copy () |
default Impl | executes (CommandExecutor executor, ExecutorType... types) |
Adds an executor to the current command builder. More... | |
default Impl | executes (CommandExecutionInfo executor, ExecutorType... types) |
Adds an executor to the current command builder. More... | |
default Impl | executes (ResultingCommandExecutor executor, ExecutorType... types) |
Adds an executor to the current command builder. More... | |
default Impl | executes (ResultingCommandExecutionInfo executor, ExecutorType... types) |
Adds an executor to the current command builder. More... | |
default Impl | executesPlayer (PlayerCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesPlayer (PlayerExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesPlayer (PlayerResultingCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesPlayer (PlayerResultingExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesEntity (EntityCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesEntity (EntityExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesEntity (EntityResultingCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesEntity (EntityResultingExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesProxy (ProxyCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesProxy (ProxyExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesProxy (ProxyResultingCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesProxy (ProxyResultingExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesCommandBlock (CommandBlockCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesCommandBlock (CommandBlockExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesCommandBlock (CommandBlockResultingCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesCommandBlock (CommandBlockResultingExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesConsole (ConsoleCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesConsole (ConsoleExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesConsole (ConsoleResultingCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesConsole (ConsoleResultingExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesNative (NativeCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesNative (NativeExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesNative (NativeResultingCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesNative (NativeResultingExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesRemoteConsole (RemoteConsoleCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesRemoteConsole (RemoteConsoleExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesRemoteConsole (RemoteConsoleResultingCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesRemoteConsole (RemoteConsoleResultingExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesFeedbackForwarding (FeedbackForwardingCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesFeedbackForwarding (FeedbackForwardingExecutionInfo info) |
Adds an executor to the current command builder. More... | |
default Impl | executesFeedbackForwarding (FeedbackForwardingResultingCommandExecutor executor) |
Adds an executor to the current command builder. More... | |
default Impl | executesFeedbackForwarding (FeedbackForwardingResultingExecutionInfo info) |
Adds an executor to the current command builder. More... | |
Protected Member Functions | |
CommandAPICommand | newConcreteCommandAPICommand (CommandMetaData< CommandSender > metaData) |
Protected Attributes | |
List< Argument > | arguments |
List< Impl > | subcommands |
boolean | isConverted |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (BukkitCommandExecutionInfo) -> () that will be executed when the command is run |
types | A list of executor types to use this executes method for. |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (CommandSender, Object[]) -> () that will be executed when the command is run |
types | A list of executor types to use this executes method for. |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (BukkitCommandExecutionInfo) -> int that will be executed when the command is run |
types | A list of executor types to use this executes method for. |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (CommandSender, CommandArguments) -> int that will be executed when the command is run |
types | A list of executor types to use this executes method for. |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (BlockCommandSender, CommandArguments) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (BlockCommandSender, CommandArguments) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (ConsoleCommandSender, CommandArguments) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (ConsoleCommandSender, CommandArguments) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (Entity, CommandArguments) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (Entity, CommandArguments) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (FeedbackForwardingCommandExecutor, CommandArguments) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (FeedbackForwardingCommandExecutor, CommandArguments) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (NativeCommandExecutor, CommandArguments) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (NativeCommandExecutor, CommandArguments) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (Player, CommandArguments) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (Player, CommandArguments) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (Entity, CommandArguments) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (Entity, CommandArguments) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (RemoteConsoleCommandExecutor, CommandArguments) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> () that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
executor | A lambda of type (RemoteConsoleResultingCommandExecutor, CommandArguments) -> int that will be executed when the command is run |
|
inherited |
Adds an executor to the current command builder.
info | A lambda of type (ExecutionInfo) -> int that will be executed when the command is run |
|
inherited |
Returns the list of arguments that this command has.
|
inherited |
Returns the list of subcommands that this command has.
|
inherited |
Returns whether this command is an automatically converted command.
void dev.jorel.commandapi.CommandAPICommand.register | ( | JavaPlugin | plugin | ) |
Registers this command with a given JavaPlugin
instance.
plugin | The plugin instance used to determine this command's namespace |
void dev.jorel.commandapi.CommandAPICommand.register | ( | String | namespace | ) |
Registers the command with a given namespace.
namespace | The namespace of this command. This cannot be null or empty |
|
inherited |
Sets the arguments that this command has.
args | the arguments that this command has |
|
inherited |
Sets the list of subcommands that this command has.
subcommands | the list of subcommands that this command has |
|
inherited |
Appends the argument(s) to the current command builder.
args | Arguments that this command can accept |
|
inherited |
Appends the arguments to the current command builder.
args | A List that represents the arguments that this command can accept |
CommandAPICommand dev.jorel.commandapi.CommandAPICommand.withHelp | ( | HelpTopic | helpTopic | ) |
Sets the HelpTopic
for this command.
Using this method will override any declared short description, full description or usage description provided via the following methods:
CommandAPICommand#withShortDescription(String)
CommandAPICommand#withFullDescription(String)
CommandAPICommand#withUsage(String...)
CommandAPICommand#withHelp(String, String)
helpTopic | the help topic to use for this command |
|
inherited |
Appends the optional arguments to the current command builder.
This also calls AbstractArgument#setOptional(boolean)
on each argument to make sure they are optional
args | Arguments that this command can accept |
|
inherited |
Appends the optional arguments to the current command builder.
This also calls AbstractArgument#setOptional(boolean)
on each argument to make sure they are optional
args | A List that represents the arguments that this command can accept |
|
inherited |
Adds a subcommand to this command builder.
subcommand | the subcommand to add as a child of this command |
|
inherited |
Adds subcommands to this command builder.
subcommands | the subcommands to add as children of this command |