CommandAPI 9.4.0
An API for the command UI introduced in Minecraft 1.13
dev.jorel.commandapi.AbstractArgumentTree< Impl, Argument, CommandSender > Class Template Referenceabstract

This is a base class for arguments, allowing them to behave as tree nodes in a AbstractCommandTree. More...

+ Inheritance diagram for dev.jorel.commandapi.AbstractArgumentTree< Impl, Argument, CommandSender >:

Public Member Functions

Impl then (final AbstractArgumentTree<?, Argument, CommandSender > tree)
 Create a child branch on this node. More...
 
CommandAPIExecutor< CommandSender, AbstractCommandSender<? extends CommandSender > > getExecutor ()
 Returns the executors that this command has. More...
 
void setExecutor (CommandAPIExecutor< CommandSender, AbstractCommandSender<? extends CommandSender > > executor)
 Sets the executors for this command. More...
 
Impl clearExecutors ()
 Clear all executors from the current command builder. More...
 
Impl instance ()
 Returns the instance of this class with the class Impl. More...
 

Protected Member Functions

 AbstractArgumentTree ()
 Instantiates an AbstractArgumentTree. More...
 
 AbstractArgumentTree (final Argument argument)
 Instantiates an AbstractArgumentTree with an underlying argument. More...
 

Protected Attributes

CommandAPIExecutor< CommandSender, AbstractCommandSender<? extends CommandSender > > executor = new CommandAPIExecutor<>()
 The CommandAPIExecutor for this executable implementation.
 

Detailed Description

This is a base class for arguments, allowing them to behave as tree nodes in a AbstractCommandTree.

Parameters
<Impl>Theclass extending this class, used as the return type for chain calls
<CommandSender>The CommandSender class used by the class extending this class

Constructor & Destructor Documentation

◆ AbstractArgumentTree() [1/2]

Instantiates an AbstractArgumentTree.

This can only be called if the class that extends this is an AbstractArgument

◆ AbstractArgumentTree() [2/2]

dev.jorel.commandapi.AbstractArgumentTree< Impl, Argument, CommandSender >.AbstractArgumentTree ( final Argument  argument)
protected

Instantiates an AbstractArgumentTree with an underlying argument.

Parameters
argumentthe argument to use as the underlying argument for this argument tree

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

◆ 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

◆ instance()

Impl dev.jorel.commandapi.ChainableBuilder< Impl >.instance ( )
inherited

Returns the instance of this class with the class Impl.

Used for chaining builder methods.

Implemented in dev.jorel.commandapi.arguments.Argument< T >.

◆ 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

◆ then()

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

Create a child branch on this node.

Parameters
treeThe child branch
Returns
this tree node