CommandAPI 8.8.0
An API for the command UI introduced in Minecraft 1.13
dev.jorel.commandapi.executors.IExecutorResulting< T extends CommandSender > Interface Template Reference

The interface for resulting command executors. More...

+ Inheritance diagram for dev.jorel.commandapi.executors.IExecutorResulting< T extends CommandSender >:

Public Member Functions

default int executeWith (CommandSender sender, Object[] args) throws WrapperCommandSyntaxException
 Executes the command executor with the provided command sender and the provided arguments. More...
 
int run (T sender, Object[] args) throws WrapperCommandSyntaxException
 Executes the command. More...
 
default ExecutorType getType ()
 Returns the type of the sender of the current executor. More...
 

Detailed Description

The interface for resulting command executors.

Parameters
<T>the commandsender

Member Function Documentation

◆ executeWith()

default int dev.jorel.commandapi.executors.IExecutorResulting< T extends CommandSender >.executeWith ( CommandSender  sender,
Object[]  args 
) throws WrapperCommandSyntaxException

Executes the command executor with the provided command sender and the provided arguments.

Parameters
senderthe command sender for this command
argsthe arguments provided to this command
Returns
the value returned by this command if the command succeeds, 0 if the command fails
Exceptions
WrapperCommandSyntaxExceptionif an error occurs during the execution of this command

Implements dev.jorel.commandapi.executors.IExecutorTyped.

◆ getType()

default ExecutorType dev.jorel.commandapi.executors.IExecutorTyped.getType ( )
inherited

Returns the type of the sender of the current executor.

Returns
the type of the sender of the current executor

◆ run()

int dev.jorel.commandapi.executors.IExecutorResulting< T extends CommandSender >.run ( sender,
Object[]  args 
) throws WrapperCommandSyntaxException

Executes the command.

Parameters
senderthe command sender for this command
argsthe arguments provided to this command
Returns
the value returned by this command
Exceptions
WrapperCommandSyntaxExceptionif an error occurs during the execution of this command