CommandAPI 9.4.0
An API for the command UI introduced in Minecraft 1.13
dev.jorel.commandapi.executors.TypedExecutor< CommandSender, WrapperType > Interface Template 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.TypedExecutor< CommandSender, WrapperType >:

Public Member Functions

default ExecutorType getType ()
 Returns the type of the sender of the current executor. More...
 
int executeWith (ExecutionInfo< CommandSender, WrapperType > info) 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.

Parameters
<WrapperType>The AbstractCommandSenderClass for this executor

Member Function Documentation

◆ executeWith()

int dev.jorel.commandapi.executors.TypedExecutor< CommandSender, WrapperType >.executeWith ( ExecutionInfo< CommandSender, WrapperType >  info) throws WrapperCommandSyntaxException

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

Parameters
infoThe ExecutionInfo for 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.NormalExecutor< CommandSender, WrapperType >, and dev.jorel.commandapi.executors.ResultingExecutor< CommandSender, WrapperType >.

◆ getType()

default ExecutorType dev.jorel.commandapi.executors.TypedExecutor< CommandSender, WrapperType >.getType ( )

Returns the type of the sender of the current executor.

Returns
the type of the sender of the current executor