Class PropertyRegistration

java.lang.Object
ke.ric.api.registration.PropertyRegistration

public class PropertyRegistration extends Object
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"));
  • Method Details

    • register

      public boolean register(PropertyRegistration.PropertyDefinitionBuilder builder)
      Register a dietary property.
      Parameters:
      builder - The property definition builder
      Returns:
      true if registered successfully
    • addViolator

      public void addViolator(String propertyId, String itemId, boolean isCustomItem)
      Add a violator item to an existing property. This marks that item as "not having" this property.
    • builder

      Create a new property definition builder.