Skip to main content

UI extension concepts

Reverse has two different UI systems. Before registering an action, choose the one your player will interact with.

Catalog menus

The catalog and details screens are inventory menus. A configured item invokes a MenuAction registered in the runtime’s MenuActionRegistry.
Use this for a details button, an information action, or navigation. Obtain the actual registry from the lobby or standalone player, not a new registry instance that the real menu never uses.

Playback hotbar

The hotbar is the control inventory shown while a viewer watches a replay. A LayoutItem defines its slot and rendering; its click bindings reference LayoutAction IDs registered through LayoutService.
Use this for seeking, speed selection, or a game-specific replay control. You can bind an action from YAML or install a rendered item programmatically.

The differences that matter

Both surfaces use namespaced IDs. Registering an existing ID replaces the existing callback. Namespacing avoids accidental collisions; it does not create automatic plugin ownership or cleanup.

Keep contexts local to the callback

Contexts describe the interaction currently being handled. Do not retain them as long-lived state or blindly use them from asynchronous completions. Schedule Bukkit work to the main thread and recheck active state, connection, request identity, and access where appropriate. Shared playback state belongs to the session. A per-viewer hotbar value can remember a chosen interval, but seeking still changes the shared cursor. For complete registration and cleanup code, see the UI example.