Class MethodCommandExecutor<S extends CommandSource>
java.lang.Object
studio.mevera.imperat.annotations.base.MethodCommandExecutor<S>
- All Implemented Interfaces:
CommandExecution<S>
@Internal
public class MethodCommandExecutor<S extends CommandSource>
extends Object
implements CommandExecution<S>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(S source, ExecutionContext<S> context) Executes the command's actionsstatic <S extends CommandSource>
MethodCommandExecutor<S>of(Imperat<S> imperat, MethodElement method) Object[]prepareArguments(@NotNull ExecutionContext<@NotNull S> context)
-
Constructor Details
-
MethodCommandExecutor
-
-
Method Details
-
of
public static <S extends CommandSource> MethodCommandExecutor<S> of(Imperat<S> imperat, MethodElement method) -
execute
Executes the command's actions- Specified by:
executein interfaceCommandExecution<S extends CommandSource>- Parameters:
source- the source/sender of this commandcontext- the context of the command- Throws:
CommandException
-
prepareArguments
public Object[] prepareArguments(@NotNull @NotNull ExecutionContext<@NotNull S> context) throws CommandException - Throws:
CommandException
-
getMethodElement
-
getBoundMethodCaller
-