Interface CMatterPredicate
-
- All Implemented Interfaces:
public interface CMatterPredicateA CMatter predicate function.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCMatterPredicate.ContextCMatterPredicate context
public classCMatterPredicate.Companion
-
Method Summary
Modifier and Type Method Description abstract Booleantest(CMatterPredicate.Context ctx)Runs this operation. Stringname()Returns a label identifying this predicate in diagnostic logs. -
-
Method Detail
-
test
abstract Boolean test(CMatterPredicate.Context ctx)
Runs this operation. If Context.asyncContext is non-null, periodically check AsyncContext.isInterrupted and return early when true to support cooperative cancellation.
When Context.isAsync returns
true, this method is invoked off the main thread. Avoid calling Bukkit API that requires the main thread directly; use a scheduler (e.g. FoliaLib) if main-thread access is needed.- Parameters:
ctx- Context of operation- Returns:
Boolean Result of operation
- Since:
5.0.17
-
name
String name()
Returns a label identifying this predicate in diagnostic logs.
A lambda carries no identity of its own, so the default is ANONYMOUS and an io.github.sakaki_aruka.customcrafter.debug.Explainer falls back to reporting the predicate's index within CMatter.predicates. Override it, or wrap the lambda with CMatterPredicates.named, to get a readable name instead.
Combinators in CMatterPredicates derive their name from the predicates they combine, so a composed predicate reports its structure without any extra work.
-
-
-
-