Class FeatureConditionProcessor
java.lang.Object
ovh.mythmc.gestalt.annotations.conditions.FeatureConditionProcessor
Evaluates whether a
-annotated class satisfies all conditions
required to be enabled.
invalid reference
Feature
Conditions are checked via:
- Methods annotated with
FeatureConditionBoolean, which must returntrue - The
FeatureConditionVersionannotation, which restricts features to specific server versions
-
Constructor Summary
ConstructorsConstructorDescriptionFeatureConditionProcessor(@NotNull Gestalt gestalt) Constructs a newFeatureConditionProcessorfor the givenGestaltinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanBeEnabled(@NotNull Class<?> clazz) Determines whether the given feature class satisfies all conditions required to be enabled.
-
Constructor Details
-
FeatureConditionProcessor
Constructs a newFeatureConditionProcessorfor the givenGestaltinstance.- Parameters:
gestalt- the active Gestalt instance
-
-
Method Details
-
canBeEnabled
Determines whether the given feature class satisfies all conditions required to be enabled.Returns
falseif any condition check throws an exception, logging the stack trace.- Parameters:
clazz- the feature class to evaluate- Returns:
trueif all conditions are met,falseotherwise
-