CommandAPI 9.7.0
An API for the command UI introduced in Minecraft 1.13
Loading...
Searching...
No Matches
dev.jorel.commandapi.arguments.ListArgument< T > Class Template Reference

An argument that accepts a list of objects. More...

+ Inheritance diagram for dev.jorel.commandapi.arguments.ListArgument< T >:

Public Member Functions

Class< List > getPrimitiveType ()
 
CommandAPIArgumentType getArgumentType ()
 
abstract< Source > T parseArgument (CommandContext< Source > cmdCtx, String key, CommandArguments previousArgs) throws CommandSyntaxException
 Parses an argument, returning the specific Bukkit object that the argument represents.
 
Argument< T > instance ()
 Returns the instance of this class with the class Impl.
 
boolean isListed ()
 Returns true if this argument will be listed in the Object args[] of the command executor.
 
boolean isOptional ()
 Returns true if this argument will be optional when executing the command this argument is included in.
 
final ArgumentType<?> getRawType ()
 Returns the NMS or brigadier type for this argument.
 
final String getNodeName ()
 Returns the name of this argument's node.
 
Impl includeSuggestions (ArgumentSuggestions< CommandSender > suggestions)
 Include suggestions to add to the list of default suggestions represented by this argument.
 
Optional< ArgumentSuggestions< CommandSender > > getIncludedSuggestions ()
 Returns an optional function which produces an array of suggestions which should be added to existing suggestions.
 
Impl replaceSuggestions (ArgumentSuggestions< CommandSender > suggestions)
 Replace the suggestions of this argument.
 
final Optional< ArgumentSuggestions< CommandSender > > getOverriddenSuggestions ()
 Returns an optional function that maps the command sender to an IStringTooltip array of suggestions for the current command.
 
final Impl withPermission (CommandPermission permission)
 Assigns the given permission as a requirement to execute this command.
 
final Impl withPermission (String permission)
 Assigns the given permission as a requirement to execute this command.
 
final CommandPermission getArgumentPermission ()
 Returns the permission required to run this command.
 
final Predicate< CommandSender > getRequirements ()
 Returns the requirements required to run this command.
 
final Impl withRequirement (Predicate< CommandSender > requirement)
 Adds a requirement that has to be satisfied to use this argument.
 
Impl setListed (boolean listed)
 Sets whether this argument will be listed in the Object args[] of the command executor.
 
Impl setOptional (boolean optional)
 Sets whether this argument will be optional when executing the command this argument is included in.
 
List< ArgumentgetCombinedArguments ()
 Returns a list of arguments linked to this argument.
 
boolean hasCombinedArguments ()
 Returns true if this argument has linked arguments.
 
final Impl combineWith (Argument... combinedArguments)
 Adds combined arguments to this argument.
 
List< String > getEntityNames (Object argument)
 Gets a list of entity names for the current provided argument.
 
void copyPermissionsAndRequirements (Argument argument)
 Copies permissions and requirements from the provided argument to this argument This also resets additional permissions and requirements.
 
String getHelpString ()
 
String toString ()
 
Impl then (final AbstractArgumentTree<?, Argument, CommandSender > tree)
 Create a child branch on this node.
 
final Impl thenNested (List< AbstractArgumentTree<?, Argument, CommandSender > > trees)
 Creates a chain of child branches starting at this node.
 
final Impl thenNested (final AbstractArgumentTree<?, Argument, CommandSender >... trees)
 Creates a chain of child branches starting at this node.
 
CommandAPIExecutor< CommandSender, AbstractCommandSender<? extends CommandSender > > getExecutor ()
 Returns the executors that this command has.
 
CommandAPIExecutor< CommandSender, AbstractCommandSender<? extends CommandSender > > getExecutor ()
 
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 Attributes

CommandAPIExecutor< CommandSender, AbstractCommandSender<? extends CommandSender > > executor
 The CommandAPIExecutor for this executable implementation.
 

Detailed Description

An argument that accepts a list of objects.

Parameters
<T>the type that this list argument generates a list of.
Since
8.2.0

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

◆ combineWith()

final Impl dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.combineWith ( Argument< List >... combinedArguments)
inherited

Adds combined arguments to this argument.

Combined arguments are used to have required arguments after optional arguments by ignoring they exist until they are added to the arguments array for registration.

This method also causes permissions and requirements from this argument to be copied over to the arguments you want to combine this argument with. Their permissions and requirements will be ignored.

Parameters
combinedArgumentsThe arguments to combine to this argument
Returns
this current argument

◆ copyPermissionsAndRequirements()

void dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.copyPermissionsAndRequirements ( Argument< List > argument)
inherited

Copies permissions and requirements from the provided argument to this argument This also resets additional permissions and requirements.

Parameters
argumentThe argument to copy permissions and requirements from

◆ 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

◆ getArgumentPermission()

final CommandPermission dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.getArgumentPermission ( )
inherited

Returns the permission required to run this command.

Returns
the permission required to run this command

◆ getCombinedArguments()

List< Argument > dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.getCombinedArguments ( )
inherited

Returns a list of arguments linked to this argument.

Returns
A list of arguments linked to this argument

◆ getEntityNames()

List< String > dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.getEntityNames ( Object argument)
inherited

Gets a list of entity names for the current provided argument.

This is expected to be implemented by EntitySelectorArgument in Bukkit, see EntitySelectorArgument#getEntityNames(Object)

Parameters
argumenta parsed (Bukkit) object representing the entity selector type. This is either a List, an Entity or a Player
Returns
a list of strings representing the names of the entity or entities from argument

◆ 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

◆ getIncludedSuggestions()

Optional< ArgumentSuggestions< CommandSender > > dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.getIncludedSuggestions ( )
inherited

Returns an optional function which produces an array of suggestions which should be added to existing suggestions.

Returns
An Optional containing a function which generates suggestions

◆ getNodeName()

final String dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.getNodeName ( )
inherited

Returns the name of this argument's node.

Returns
the name of this argument's node

◆ getOverriddenSuggestions()

final Optional< ArgumentSuggestions< CommandSender > > dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.getOverriddenSuggestions ( )
inherited

Returns an optional function that maps the command sender to an IStringTooltip array of suggestions for the current command.

Returns
a function that provides suggestions, or Optional.empty() if there are no overridden suggestions.

◆ getRawType()

final ArgumentType<?> dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.getRawType ( )
inherited

Returns the NMS or brigadier type for this argument.

Returns
the NMS or brigadier type for this argument

◆ getRequirements()

final Predicate< CommandSender > dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.getRequirements ( )
inherited

Returns the requirements required to run this command.

Returns
the requirements required to run this command

◆ hasCombinedArguments()

boolean dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.hasCombinedArguments ( )
inherited

Returns true if this argument has linked arguments.

Returns
true if this argument has linked arguments

◆ includeSuggestions()

Impl dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.includeSuggestions ( ArgumentSuggestions< CommandSender > suggestions)
inherited

Include suggestions to add to the list of default suggestions represented by this argument.

Parameters
suggestionsAn ArgumentSuggestions object representing the suggestions. Use the Static methods on ArgumentSuggestions to create these.
Returns
the current argument

◆ instance()

Argument< T > dev.jorel.commandapi.arguments.Argument< T >.instance ( )
inherited

Returns the instance of this class with the class Impl.

Used for chaining builder methods.

◆ isListed()

boolean dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.isListed ( )
inherited

Returns true if this argument will be listed in the Object args[] of the command executor.

Returns
true if this argument will be listed in the Object args[] of the command executor

◆ isOptional()

boolean dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.isOptional ( )
inherited

Returns true if this argument will be optional when executing the command this argument is included in.

Returns
true if this argument will be optional when executing the command this argument is included in

◆ parseArgument()

abstract< Source > T dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.parseArgument ( CommandContext< Source > cmdCtx,
String key,
CommandArguments previousArgs ) throws CommandSyntaxException
abstractinherited

Parses an argument, returning the specific Bukkit object that the argument represents.

This is intended for use by the internals of the CommandAPI and isn't expected to be used outside the CommandAPI

Parameters
<Source>the command source type
cmdCtxthe context which ran this command
keythe name of the argument node
previousArgsa CommandArguments object holding previous parsed arguments
Returns
the parsed object represented by this argument
Exceptions
CommandSyntaxExceptionif parsing fails

◆ replaceSuggestions()

Impl dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.replaceSuggestions ( ArgumentSuggestions< CommandSender > suggestions)
inherited

Replace the suggestions of this argument.

Parameters
suggestionsAn ArgumentSuggestions object representing the suggestions. Use the static methods in ArgumentSuggestions to create these.
Returns
the current argument

◆ 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

◆ setListed()

Impl dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.setListed ( boolean listed)
inherited

Sets whether this argument will be listed in the Object args[] of the command executor.

Parameters
listedif true, this argument will be included in the Object args[] of the command executor
Returns
this current argument

◆ setOptional()

Impl dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.setOptional ( boolean optional)
inherited

Sets whether this argument will be optional when executing the command this argument is included in.

Parameters
optionalif true, this argument will be optional when executing the command this argument is included in
Returns
this current argument

◆ then()

Impl dev.jorel.commandapi.AbstractArgumentTree< Impl, Argument, CommandSender >.then ( final AbstractArgumentTree<?, Argument< List >, CommandSender > tree)
inherited

Create a child branch on this node.

Parameters
treeThe child branch
Returns
this tree node

◆ thenNested() [1/2]

final Impl dev.jorel.commandapi.AbstractArgumentTree< Impl, Argument, CommandSender >.thenNested ( final AbstractArgumentTree<?, Argument< List >, CommandSender >... trees)
inherited

Creates a chain of child branches starting at this node.

thenNested(a, b, c) is equivalent to then(a.then(b.then(c))).

Parameters
treesThe child branches to add in a chain.
Returns
this tree node

◆ thenNested() [2/2]

final Impl dev.jorel.commandapi.AbstractArgumentTree< Impl, Argument, CommandSender >.thenNested ( List< AbstractArgumentTree<?, Argument< List >, CommandSender > > trees)
inherited

Creates a chain of child branches starting at this node.

thenNested(a, b, c) is equivalent to then(a.then(b.then(c))).

Parameters
treesThe child branches to add in a chain.
Returns
this tree node

◆ withPermission() [1/2]

final Impl dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.withPermission ( CommandPermission permission)
inherited

Assigns the given permission as a requirement to execute this command.

Parameters
permissionthe permission required to execute this command
Returns
this current argument

◆ withPermission() [2/2]

final Impl dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.withPermission ( String permission)
inherited

Assigns the given permission as a requirement to execute this command.

Parameters
permissionthe permission required to execute this command
Returns
this current argument

◆ withRequirement()

final Impl dev.jorel.commandapi.arguments.AbstractArgument< T, Impl, Argument, CommandSender >.withRequirement ( Predicate< CommandSender > requirement)
inherited

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

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 argument
Returns
this current argument