Interface GameEvent

All Known Implementing Classes:
ActionExecutedEvent, BreakEndedEvent, BreakStartedEvent, ChatMessageEvent, ConnectionLostEvent, KeyInputEvent, LoginStateChangeEvent, ObjVarChangeEvent, RadioGroupSelectEvent, ReconnectStateChangedEvent, ScriptCrashedEvent, ScriptLoadFailedEvent, SpotAnimEvent, TickEvent, VarbitChangeEvent, VarcChangeEvent, VarChangeEvent, WalkArrivedEvent, WalkCancelledEvent, WalkFailedEvent

Common interface for every typed game event distributed through the EventBus.

The hierarchy is closed: each variant is a record permitted below. Consumers can dispatch with an exhaustive switch over GameEvent, and the compiler will refuse to build when a new variant is added without coverage.

Every event carries a millisecond timestamp(); type() returns the event's simple class name, which is the stable, scriptable discriminator.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Timestamp at which the event was constructed, in milliseconds since epoch.
    default String
    Returns the event's simple class name as a stable string discriminator.
  • Method Details

    • timestamp

      long timestamp()
      Timestamp at which the event was constructed, in milliseconds since epoch.
    • type

      default String type()
      Returns the event's simple class name as a stable string discriminator.