CommandAPI 9.7.0
An API for the command UI introduced in Minecraft 1.13
Loading...
Searching...
No Matches
dev.jorel.commandapi.CommandAPICommand Class Reference
+ Inheritance diagram for dev.jorel.commandapi.CommandAPICommand:

Public Member Functions

 CommandAPICommand (CommandMetaData< CommandSender > meta)
 
 CommandAPICommand (String commandName)
 
CommandAPICommand instance ()
 
CommandAPICommand withHelp (HelpTopic helpTopic)
 Sets the HelpTopic for this command.
 
void register (String namespace)
 Registers the command with a given namespace.
 
void register (JavaPlugin plugin)
 Registers this command with a given JavaPlugin instance.
 
boolean isConverted ()
 Returns whether this command is an automatically converted command.
 
Impl withArguments (List< Argument > args)
 Appends the arguments to the current command builder.
 
final Impl withArguments (Argument... args)
 Appends the argument(s) to the current command builder.
 
Impl withOptionalArguments (List< Argument > args)
 Appends the optional arguments to the current command builder.
 
final Impl withOptionalArguments (Argument... args)
 Appends the optional arguments to the current command builder.
 
Impl withSubcommand (Impl subcommand)
 Adds a subcommand to this command builder.
 
Impl withSubcommands ( @SuppressWarnings("unchecked") Impl... subcommands)
 Adds subcommands to this command builder.
 
List< ArgumentgetArguments ()
 Returns the list of arguments that this command has.
 
void setArguments (List< Argument > args)
 Sets the arguments that this command has.
 
List< Impl > getSubcommands ()
 Returns the list of subcommands that this command has.
 
void setSubcommands (List< Impl > subcommands)
 Sets the list of subcommands that this command has.
 
void register ()
 Registers this command with the default namespace.
 
Impl copy ()
 
String getName ()
 Returns the name of this command.
 
Impl withPermission (CommandPermission permission)
 Applies a permission to the current command builder.
 
Impl withPermission (String permission)
 Applies a permission to the current command builder.
 
Impl withoutPermission (CommandPermission permission)
 Applies a permission to the current command builder.
 
Impl withoutPermission (String permission)
 Applies a permission to the current command builder.
 
Impl withRequirement (Predicate< CommandSender > requirement)
 Adds a requirement that has to be satisfied to use this command.
 
Impl withAliases (String... aliases)
 Adds an array of aliases to the current command builder.
 
CommandPermission getPermission ()
 Returns the permission associated with this command.
 
void setPermission (CommandPermission permission)
 Sets the permission required to run this command.
 
String[] getAliases ()
 Returns an array of aliases that can be used to run this command.
 
void setAliases (String[] aliases)
 Sets the aliases for this command.
 
Predicate< CommandSender > getRequirements ()
 Returns the requirements that must be satisfied to run this command.
 
void setRequirements (Predicate< CommandSender > requirements)
 Sets the requirements that must be satisfied to run this command.
 
String getShortDescription ()
 Returns the short description for this command.
 
Impl withShortDescription (String description)
 Sets the short description for this command.
 
String getFullDescription ()
 Returns the full description for this command.
 
Impl withFullDescription (String description)
 Sets the full description for this command.
 
Impl withUsage (String... usage)
 Sets the full usage for this command.
 
String[] getUsage ()
 Returns the usage for this command.
 
Impl withHelp (String shortDescription, String fullDescription)
 Sets the short and full description for this command.
 
void override ()
 Overrides a command.
 
CommandAPIExecutor< CommandSender, AbstractCommandSender<? extends CommandSender > > getExecutor ()
 Returns the executors that this command has.
 
void setExecutor (CommandAPIExecutor< CommandSender, AbstractCommandSender<? extends CommandSender > > executor)
 Sets the executors for this command.
 
Impl clearExecutors ()
 Clear all executors from the current command builder.
 
default Impl executes (CommandExecutor executor, ExecutorType... types)
 Adds an executor to the current command builder.
 
default Impl executes (CommandExecutionInfo executor, ExecutorType... types)
 Adds an executor to the current command builder.
 
default Impl executes (ResultingCommandExecutor executor, ExecutorType... types)
 Adds an executor to the current command builder.
 
default Impl executes (ResultingCommandExecutionInfo executor, ExecutorType... types)
 Adds an executor to the current command builder.
 
default Impl executesPlayer (PlayerCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesPlayer (PlayerExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesPlayer (PlayerResultingCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesPlayer (PlayerResultingExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesEntity (EntityCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesEntity (EntityExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesEntity (EntityResultingCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesEntity (EntityResultingExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesProxy (ProxyCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesProxy (ProxyExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesProxy (ProxyResultingCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesProxy (ProxyResultingExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesCommandBlock (CommandBlockCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesCommandBlock (CommandBlockExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesCommandBlock (CommandBlockResultingCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesCommandBlock (CommandBlockResultingExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesConsole (ConsoleCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesConsole (ConsoleExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesConsole (ConsoleResultingCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesConsole (ConsoleResultingExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesNative (NativeCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesNative (NativeExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesNative (NativeResultingCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesNative (NativeResultingExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesRemoteConsole (RemoteConsoleCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesRemoteConsole (RemoteConsoleExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesRemoteConsole (RemoteConsoleResultingCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesRemoteConsole (RemoteConsoleResultingExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesFeedbackForwarding (FeedbackForwardingCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesFeedbackForwarding (FeedbackForwardingExecutionInfo info)
 Adds an executor to the current command builder.
 
default Impl executesFeedbackForwarding (FeedbackForwardingResultingCommandExecutor executor)
 Adds an executor to the current command builder.
 
default Impl executesFeedbackForwarding (FeedbackForwardingResultingExecutionInfo info)
 Adds an executor to the current command builder.
 

Protected Member Functions

CommandAPICommand newConcreteCommandAPICommand (CommandMetaData< CommandSender > metaData)
 

Protected Attributes

List< Argumentarguments
 
List< Impl > subcommands
 
boolean isConverted
 
final CommandMetaData< CommandSender > meta
 The Command's meta-data for this executable command.
 
CommandAPIExecutor< CommandSender, AbstractCommandSender<? extends CommandSender > > executor
 The CommandAPIExecutor for this executable implementation.
 

Member Function Documentation

◆ clearExecutors()

Impl dev.jorel.commandapi.Executable< Impl, CommandSender >.clearExecutors ( )
inherited

Clear all executors from the current command builder.

Returns
this command builder

◆ executes() [1/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executes ( CommandExecutionInfo executor,
ExecutorType... types )
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (BukkitCommandExecutionInfo) -> () that will be executed when the command is run
typesA list of executor types to use this executes method for.
Returns
this command builder

◆ executes() [2/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executes ( CommandExecutor executor,
ExecutorType... types )
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (CommandSender, Object[]) -> () that will be executed when the command is run
typesA list of executor types to use this executes method for.
Returns
this command builder

◆ executes() [3/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executes ( ResultingCommandExecutionInfo executor,
ExecutorType... types )
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (BukkitCommandExecutionInfo) -> int that will be executed when the command is run
typesA list of executor types to use this executes method for.
Returns
this command builder

◆ executes() [4/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executes ( ResultingCommandExecutor executor,
ExecutorType... types )
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (CommandSender, CommandArguments) -> int that will be executed when the command is run
typesA list of executor types to use this executes method for.
Returns
this command builder

◆ executesCommandBlock() [1/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesCommandBlock ( CommandBlockCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (BlockCommandSender, CommandArguments) -> () that will be executed when the command is run
Returns
this command builder

◆ executesCommandBlock() [2/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesCommandBlock ( CommandBlockExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> () that will be executed when the command is run
Returns
this command builder

◆ executesCommandBlock() [3/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesCommandBlock ( CommandBlockResultingCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (BlockCommandSender, CommandArguments) -> int that will be executed when the command is run
Returns
this command builder

◆ executesCommandBlock() [4/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesCommandBlock ( CommandBlockResultingExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> int that will be executed when the command is run
Returns
this command builder

◆ executesConsole() [1/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesConsole ( ConsoleCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (ConsoleCommandSender, CommandArguments) -> () that will be executed when the command is run
Returns
this command builder

◆ executesConsole() [2/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesConsole ( ConsoleExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> () that will be executed when the command is run
Returns
this command builder

◆ executesConsole() [3/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesConsole ( ConsoleResultingCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (ConsoleCommandSender, CommandArguments) -> int that will be executed when the command is run
Returns
this command builder

◆ executesConsole() [4/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesConsole ( ConsoleResultingExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> int that will be executed when the command is run
Returns
this command builder

◆ executesEntity() [1/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesEntity ( EntityCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (Entity, CommandArguments) -> () that will be executed when the command is run
Returns
this command builder

◆ executesEntity() [2/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesEntity ( EntityExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> () that will be executed when the command is run
Returns
this command builder

◆ executesEntity() [3/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesEntity ( EntityResultingCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (Entity, CommandArguments) -> int that will be executed when the command is run
Returns
this command builder

◆ executesEntity() [4/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesEntity ( EntityResultingExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> int that will be executed when the command is run
Returns
this command builder

◆ executesFeedbackForwarding() [1/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesFeedbackForwarding ( FeedbackForwardingCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (FeedbackForwardingCommandExecutor, CommandArguments) -> () that will be executed when the command is run
Returns
this command builder

◆ executesFeedbackForwarding() [2/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesFeedbackForwarding ( FeedbackForwardingExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> () that will be executed when the command is run
Returns
this command builder

◆ executesFeedbackForwarding() [3/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesFeedbackForwarding ( FeedbackForwardingResultingCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (FeedbackForwardingCommandExecutor, CommandArguments) -> int that will be executed when the command is run
Returns
this command builder

◆ executesFeedbackForwarding() [4/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesFeedbackForwarding ( FeedbackForwardingResultingExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> int that will be executed when the command is run
Returns
this command builder

◆ executesNative() [1/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesNative ( NativeCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (NativeCommandExecutor, CommandArguments) -> () that will be executed when the command is run
Returns
this command builder

◆ executesNative() [2/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesNative ( NativeExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> () that will be executed when the command is run
Returns
this command builder

◆ executesNative() [3/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesNative ( NativeResultingCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (NativeCommandExecutor, CommandArguments) -> int that will be executed when the command is run
Returns
this command builder

◆ executesNative() [4/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesNative ( NativeResultingExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> int that will be executed when the command is run
Returns
this command builder

◆ executesPlayer() [1/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesPlayer ( PlayerCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (Player, CommandArguments) -> () that will be executed when the command is run
Returns
this command builder

◆ executesPlayer() [2/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesPlayer ( PlayerExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> () that will be executed when the command is run
Returns
this command builder

◆ executesPlayer() [3/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesPlayer ( PlayerResultingCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (Player, CommandArguments) -> int that will be executed when the command is run
Returns
this command builder

◆ executesPlayer() [4/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesPlayer ( PlayerResultingExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> int that will be executed when the command is run
Returns
this command builder

◆ executesProxy() [1/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesProxy ( ProxyCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (Entity, CommandArguments) -> () that will be executed when the command is run
Returns
this command builder

◆ executesProxy() [2/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesProxy ( ProxyExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> () that will be executed when the command is run
Returns
this command builder

◆ executesProxy() [3/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesProxy ( ProxyResultingCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (Entity, CommandArguments) -> int that will be executed when the command is run
Returns
this command builder

◆ executesProxy() [4/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesProxy ( ProxyResultingExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> int that will be executed when the command is run
Returns
this command builder

◆ executesRemoteConsole() [1/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesRemoteConsole ( RemoteConsoleCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (RemoteConsoleCommandExecutor, CommandArguments) -> () that will be executed when the command is run
Returns
this command builder

◆ executesRemoteConsole() [2/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesRemoteConsole ( RemoteConsoleExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> () that will be executed when the command is run
Returns
this command builder

◆ executesRemoteConsole() [3/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesRemoteConsole ( RemoteConsoleResultingCommandExecutor executor)
inherited

Adds an executor to the current command builder.

Parameters
executorA lambda of type (RemoteConsoleResultingCommandExecutor, CommandArguments) -> int that will be executed when the command is run
Returns
this command builder

◆ executesRemoteConsole() [4/4]

default Impl dev.jorel.commandapi.BukkitExecutable< Impl >.executesRemoteConsole ( RemoteConsoleResultingExecutionInfo info)
inherited

Adds an executor to the current command builder.

Parameters
infoA lambda of type (ExecutionInfo) -> int that will be executed when the command is run
Returns
this command builder

◆ getAliases()

String[] dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.getAliases ( )
inherited

Returns an array of aliases that can be used to run this command.

Returns
an array of aliases that can be used to run this command

◆ getArguments()

List< Argument > dev.jorel.commandapi.AbstractCommandAPICommand< Impl, Argument, CommandSender >.getArguments ( )
inherited

Returns the list of arguments that this command has.

Returns
the list of arguments that this command has

◆ getExecutor()

CommandAPIExecutor< CommandSender, AbstractCommandSender<? extends CommandSender > > dev.jorel.commandapi.Executable< Impl, CommandSender >.getExecutor ( )
inherited

Returns the executors that this command has.

Returns
the executors that this command has

◆ getFullDescription()

String dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.getFullDescription ( )
inherited

Returns the full description for this command.

Returns
the full description for this command

◆ getName()

String dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.getName ( )
inherited

Returns the name of this command.

Returns
the name of this command

◆ getPermission()

CommandPermission dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.getPermission ( )
inherited

Returns the permission associated with this command.

Returns
the permission associated with this command

◆ getRequirements()

Predicate< CommandSender > dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.getRequirements ( )
inherited

Returns the requirements that must be satisfied to run this command.

Returns
the requirements that must be satisfied to run this command

◆ getShortDescription()

String dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.getShortDescription ( )
inherited

Returns the short description for this command.

Returns
the short description for this command

◆ getSubcommands()

List< Impl > dev.jorel.commandapi.AbstractCommandAPICommand< Impl, Argument, CommandSender >.getSubcommands ( )
inherited

Returns the list of subcommands that this command has.

Returns
the list of subcommands that this command has

◆ getUsage()

String[] dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.getUsage ( )
inherited

Returns the usage for this command.

Returns
the usage for this command

◆ isConverted()

boolean dev.jorel.commandapi.AbstractCommandAPICommand< Impl, Argument, CommandSender >.isConverted ( )
inherited

Returns whether this command is an automatically converted command.

Returns
whether this command is an automatically converted command

◆ override()

void dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.override ( )
inherited

Overrides a command.

Effectively the same as unregistering the command using CommandAPI.unregister() and then registering the command using .register()

◆ register() [1/2]

void dev.jorel.commandapi.CommandAPICommand.register ( JavaPlugin plugin)

Registers this command with a given JavaPlugin instance.

Parameters
pluginThe plugin instance used to determine this command's namespace

◆ register() [2/2]

void dev.jorel.commandapi.CommandAPICommand.register ( String namespace)

Registers the command with a given namespace.

Parameters
namespaceThe namespace of this command. This cannot be null or empty

◆ setAliases()

void dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.setAliases ( String[] aliases)
inherited

Sets the aliases for this command.

Parameters
aliasesthe aliases for this command

◆ setArguments()

void dev.jorel.commandapi.AbstractCommandAPICommand< Impl, Argument, CommandSender >.setArguments ( List< Argument > args)
inherited

Sets the arguments that this command has.

Parameters
argsthe arguments that this command has

◆ setExecutor()

void dev.jorel.commandapi.Executable< Impl, CommandSender >.setExecutor ( CommandAPIExecutor< CommandSender, AbstractCommandSender<? extends CommandSender > > executor)
inherited

Sets the executors for this command.

Parameters
executorthe executors for this command

◆ setPermission()

void dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.setPermission ( CommandPermission permission)
inherited

Sets the permission required to run this command.

Parameters
permissionthe permission required to run this command

◆ setRequirements()

void dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.setRequirements ( Predicate< CommandSender > requirements)
inherited

Sets the requirements that must be satisfied to run this command.

Parameters
requirementsthe requirements that must be satisfied to run this command

◆ setSubcommands()

void dev.jorel.commandapi.AbstractCommandAPICommand< Impl, Argument, CommandSender >.setSubcommands ( List< Impl > subcommands)
inherited

Sets the list of subcommands that this command has.

Parameters
subcommandsthe list of subcommands that this command has

◆ withAliases()

Impl dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.withAliases ( String... aliases)
inherited

Adds an array of aliases to the current command builder.

Parameters
aliasesAn array of aliases which can be used to execute this command
Returns
this command builder

◆ withArguments() [1/2]

final Impl dev.jorel.commandapi.AbstractCommandAPICommand< Impl, Argument, CommandSender >.withArguments ( Argument... args)
inherited

Appends the argument(s) to the current command builder.

Parameters
argsArguments that this command can accept
Returns
this command builder

◆ withArguments() [2/2]

Impl dev.jorel.commandapi.AbstractCommandAPICommand< Impl, Argument, CommandSender >.withArguments ( List< Argument > args)
inherited

Appends the arguments to the current command builder.

Parameters
argsA List that represents the arguments that this command can accept
Returns
this command builder

◆ withFullDescription()

Impl dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.withFullDescription ( String description)
inherited

Sets the full description for this command.

This is the help which is shown in the specific /help page for this command (e.g. /help mycommand).

Parameters
descriptionthe full description for this command
Returns
this command builder

◆ withHelp() [1/2]

Impl dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.withHelp ( String shortDescription,
String fullDescription )
inherited

Sets the short and full description for this command.

This is a short-hand for the ExecutableCommand#withShortDescription and ExecutableCommand#withFullDescription methods.

Parameters
shortDescriptionthe short description for this command
fullDescriptionthe full description for this command
Returns
this command builder

◆ withHelp() [2/2]

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:

Parameters
helpTopicthe help topic to use for this command
Returns
this command builder

◆ withOptionalArguments() [1/2]

final Impl dev.jorel.commandapi.AbstractCommandAPICommand< Impl, Argument, CommandSender >.withOptionalArguments ( Argument... args)
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

Parameters
argsArguments that this command can accept
Returns
this command builder

◆ withOptionalArguments() [2/2]

Impl dev.jorel.commandapi.AbstractCommandAPICommand< Impl, Argument, CommandSender >.withOptionalArguments ( List< Argument > args)
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

Parameters
argsA List that represents the arguments that this command can accept
Returns
this command builder

◆ withoutPermission() [1/2]

Impl dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.withoutPermission ( CommandPermission permission)
inherited

Applies a permission to the current command builder.

Parameters
permissionThe permission node required to execute this command
Returns
this command builder

◆ withoutPermission() [2/2]

Impl dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.withoutPermission ( String permission)
inherited

Applies a permission to the current command builder.

Parameters
permissionThe permission node required to execute this command
Returns
this command builder

◆ withPermission() [1/2]

Impl dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.withPermission ( CommandPermission permission)
inherited

Applies a permission to the current command builder.

Parameters
permissionThe permission node required to execute this command
Returns
this command builder

◆ withPermission() [2/2]

Impl dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.withPermission ( String permission)
inherited

Applies a permission to the current command builder.

Parameters
permissionThe permission node required to execute this command
Returns
this command builder

◆ withRequirement()

Impl dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.withRequirement ( Predicate< CommandSender > requirement)
inherited

Adds a requirement that has to be satisfied to use this command.

This method can be used multiple times and each use of this method will AND its requirement with the previously declared ones

Parameters
requirementthe predicate that must be satisfied to use this command
Returns
this command builder

◆ withShortDescription()

Impl dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.withShortDescription ( String description)
inherited

Sets the short description for this command.

This is the help which is shown in the main /help menu.

Parameters
descriptionthe short description for this command
Returns
this command builder

◆ withSubcommand()

Impl dev.jorel.commandapi.AbstractCommandAPICommand< Impl, Argument, CommandSender >.withSubcommand ( Impl subcommand)
inherited

Adds a subcommand to this command builder.

Parameters
subcommandthe subcommand to add as a child of this command
Returns
this command builder

◆ withSubcommands()

Impl dev.jorel.commandapi.AbstractCommandAPICommand< Impl, Argument, CommandSender >.withSubcommands ( @SuppressWarnings("unchecked") Impl... subcommands)
inherited

Adds subcommands to this command builder.

Parameters
subcommandsthe subcommands to add as children of this command
Returns
this command builder

◆ withUsage()

Impl dev.jorel.commandapi.ExecutableCommand< Impl, CommandSender >.withUsage ( String... usage)
inherited

Sets the full usage for this command.

This is the usage which is shown in the specific /help page for this command (e.g. /help mycommand).

Parameters
usagethe full usage for this command
Returns
this command builder