Package revxrsal.commands.process
Interface CommandCondition
public interface CommandCondition
Represents a condition that must be met in order for the command
invocation to continue.
These conditions can test against custom annotations in ExecutableCommand
s,
and hence perform external checks for reducing boilerplate
-
Method Summary
Modifier and TypeMethodDescriptionvoid
test
(@NotNull CommandActor actor, @NotNull ExecutableCommand command, @NotNull @Unmodifiable List<String> arguments) Evaluates the condition.
-
Method Details
-
test
void test(@NotNull @NotNull CommandActor actor, @NotNull @NotNull ExecutableCommand command, @NotNull @NotNull @Unmodifiable List<String> arguments) Evaluates the condition.Ideally, this should throw any exceptions if the condition fails, and lets them get handled by the
CommandExceptionHandler
.- Parameters:
actor
- The command actorcommand
- The invoked commandarguments
- An immutable view of command arguments
-