Interface EventCondition.Config

All Known Implementing Classes:
EnterInstanceTeleporterCondition.Config, EnterPortalCondition.Config, EventEndCondition.Config, GameFlagLevelCondition.Config, IntervalCondition.Config, LocationCondition.Config, NoCondition.Config, ProximityCondition.Config, SignalCondition.Config, TimeCondition.Config, WorldClosedCondition.Config
Enclosing interface:
EventCondition

public static interface EventCondition.Config
Asset-side factory for an EventCondition. Decoded from JSON at asset-load time and called at runtime to produce live condition instances.

Implementations are typically inner classes of the condition they create, named Config, and hold the immutable configuration fields decoded from the asset file. The mutable runtime state lives in the EventCondition instance returned by create().

  • Field Details

  • Method Details

    • create

      @Nonnull EventCondition create()
      Creates a new live condition instance from this config. Called once per stage start.
      Returns:
      a fresh, unstarted condition ready to be submitted to the ConditionManager
    • validate

      default void validate(@Nonnull Validator validator)
      Called at asset-load time so the config can register any ContextKey values it references and perform any other validation of the configuration.
      Parameters:
      validator - the validator to register key references with