CommandAPI 9.7.0
An API for the command UI introduced in Minecraft 1.13
Loading...
Searching...
No Matches
dev.jorel.commandapi.executors.CommandExecutor Interface Reference

A normal command executor for a CommandSender. More...

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

Public Member Functions

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

Detailed Description

A normal command executor for a CommandSender.

Member Function Documentation

◆ executeWith()

default int dev.jorel.commandapi.executors.NormalExecutor< 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
1 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.CommandExecutor.getType ( )

Returns the type of the sender of the current executor.

Returns
the type of the sender of the current executor

◆ run() [1/3]

void dev.jorel.commandapi.executors.CommandExecutor.run ( CommandSender 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.

◆ run() [2/3]

default void dev.jorel.commandapi.executors.CommandExecutor.run ( ExecutionInfo< CommandSender, BukkitCommandSender<? extends CommandSender > > info) throws WrapperCommandSyntaxException

The code to run when this command is performed.

Parameters
infoThe ExecutionInfo for this command

◆ run() [3/3]

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

Executes the command.

Parameters
infoThe ExecutionInfo for this command
Exceptions
WrapperCommandSyntaxExceptionif an error occurs during the execution of this command