Interface TypedExecutor<CommandSender, WrapperType extends AbstractCommandSender<? extends CommandSender>>
- Type Parameters:
WrapperType- The AbstractCommandSenderClass for this executor
- All Known Subinterfaces:
NormalExecutor<CommandSender, WrapperType>, ResultingExecutor<CommandSender, WrapperType>
public interface TypedExecutor<CommandSender, WrapperType extends AbstractCommandSender<? extends CommandSender>>
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
-
Method Summary
Modifier and TypeMethodDescriptionintExecutes the command executor with the provided command sender and the provided arguments.default ExecutorTypegetType()Returns the type of the sender of the current executor.
-
Method Details
-
getType
Returns the type of the sender of the current executor.- Returns:
- the type of the sender of the current executor
-
executeWith
int executeWith(ExecutionInfo<CommandSender, WrapperType> info) throws WrapperCommandSyntaxException Executes the command executor with the provided command sender and the provided arguments.- Parameters:
info- The ExecutionInfo for this command- Returns:
- the value returned by this command if the command succeeds, 0 if the command fails
- Throws:
WrapperCommandSyntaxException- if an error occurs during the execution of this command
-