CommandAPI 8.8.0
An API for the command UI introduced in Minecraft 1.13
dev.jorel.commandapi.executors.IExecutorTyped Interface Reference

An interface that includes the type of an executor (what command senders it can execute) and has a method that executes an executor with a given command sender and arguments. More...

+ Inheritance diagram for dev.jorel.commandapi.executors.IExecutorTyped:

Public Member Functions

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

Detailed Description

An interface that includes the type of an executor (what command senders it can execute) and has a method that executes an executor with a given command sender and arguments.

Member Function Documentation

◆ executeWith()

int dev.jorel.commandapi.executors.IExecutorTyped.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

Implemented in dev.jorel.commandapi.executors.IExecutorNormal< T extends CommandSender >, and dev.jorel.commandapi.executors.IExecutorResulting< T extends CommandSender >.

◆ getType()

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

Returns the type of the sender of the current executor.

Returns
the type of the sender of the current executor