Interface Requirement<C,R extends Requirement<C,R>>
- Type Parameters:
C- command sender typeR- requirement type, used for inheritance
@API(status=STABLE,
since="1.0.0")
public interface Requirement<C,R extends Requirement<C,R>>
A requirement for a command to be executed.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluateRequirement(@NonNull org.incendo.cloud.context.CommandContext<C> commandContext) Returns whether the givencontextmeets the requirement.parents()Returns the parents of the requirement.
-
Method Details
-
evaluateRequirement
Returns whether the givencontextmeets the requirement.- Parameters:
commandContext- command context to evaluate- Returns:
trueif the context meets the requirement,falseif not
-
parents
Returns the parents of the requirement.The parents will always be evaluated before
thisrequirement.- Returns:
- the parents
-