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

A resulting command executor for an Entity. More...

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

Public Member Functions

int run (Entity sender, CommandArguments args) throws WrapperCommandSyntaxException
 The code to run when this command is performed. More...
 
default int run (ExecutionInfo< Entity, BukkitEntity > info) throws WrapperCommandSyntaxException
 The code to run when this command is performed. More...
 
default ExecutorType getType ()
 Returns the type of the sender of the current executor. More...
 
default int executeWith (ExecutionInfo< CommandSender, WrapperType > info) throws WrapperCommandSyntaxException
 Executes the command executor with the provided command sender and the provided arguments. More...
 
int run (ExecutionInfo< CommandSender, WrapperType > info) throws WrapperCommandSyntaxException
 Executes the command. More...
 

Detailed Description

A resulting command executor for an Entity.

Member Function Documentation

◆ executeWith()

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

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

◆ getType()

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

Returns the type of the sender of the current executor.

Returns
the type of the sender of the current executor

◆ run() [1/3]

int dev.jorel.commandapi.executors.EntityResultingCommandExecutor.run ( Entity  sender,
CommandArguments  args 
) throws WrapperCommandSyntaxException

The code to run when this command is performed.

Parameters
senderThe sender of this command (a player, the console etc.)
argsThe arguments given to this command.
Returns
the result of this command

◆ run() [2/3]

int dev.jorel.commandapi.executors.ResultingExecutor< CommandSender, WrapperType >.run ( ExecutionInfo< CommandSender, WrapperType >  info) throws WrapperCommandSyntaxException
inherited

Executes the command.

Parameters
infoThe ExecutionInfo for this command
Returns
the value returned by this command
Exceptions
WrapperCommandSyntaxExceptionif an error occurs during the execution of this command

◆ run() [3/3]

default int dev.jorel.commandapi.executors.EntityResultingCommandExecutor.run ( ExecutionInfo< Entity, BukkitEntity info) throws WrapperCommandSyntaxException

The code to run when this command is performed.

Parameters
infoThe ExecutionInfo for this command
Returns
the result of this command