Dialog System
The dialog system wraps Paper 1.21's native dialog API, letting you define interactive overlay windows in YAML without writing Java code.
Concepts
Term | Description |
|---|---|
DialogBlueprint | The parsed YAML definition. Immutable; shared across all players. |
ComputedDialog | A per-player runtime instance. Holds the bound |
Body | Text or item content displayed in the dialog window. |
Input | Interactive widget (text field, toggle, slider, dropdown). |
Button | Yes/No action buttons. Each has a label, optional tooltip, width, and action list. |
File Layout
Place dialog YAML files in:
Sub-folders are scanned recursively. The file name is irrelevant; use the id field to reference dialogs.
Lifecycle
Input Value Placeholders
After the player clicks a button, each input's current value is bound as a placeholder %input.<input-id>% and available to all actions inside that button:
Opening a Dialog
Via action (from a menu)
Wait — dialogs are not menus. To open a dialog from a menu action, use a console or player action to run /astraldialog open <id>, or open it from a Java listener:
Via command
open-actions / close-actions
These fire when the dialog is shown or dismissed (Escape or explicit close).