Class PropertyRegistration
java.lang.Object
ke.ric.api.registration.PropertyRegistration
API for registering custom dietary properties programmatically.
Usage:
api.properties().register(PropertyRegistration.builder()
.id("ALCOHOLIC")
.displayName("&6🍷 Alcoholic")
.displayIcon("🍷")
.description("Contains alcohol")
.violatorItems("WATER_BUCKET", "MILK_BUCKET")
.violatorCustomItems("GRAPE_JUICE", "APPLE_CIDER"));
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for creating dietary property definitions. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddViolator(String propertyId, String itemId, boolean isCustomItem) Add a violator item to an existing property.builder()Create a new property definition builder.booleanRegister a dietary property.
-
Method Details
-
register
Register a dietary property.- Parameters:
builder- The property definition builder- Returns:
- true if registered successfully
-
addViolator
-
builder
Create a new property definition builder.
-