Dialog - Dynamic Callback Action Button (Section) — SkBee
Addon: SkBee · Category: Section · Since: 3.16.0
Syntax
add [dynamic] callback action buttonDescription
Add a dynamic action button to a dialog. This action includes a callback section to run code when the action button is clicked. See [**Custom Dynmaic Action**](https://minecraft.wiki/w/Dialog#dynamic/custom) on McWiki for more specific info. **Entries**: - `label` = The name on your button, accepts a string or text component/mini message. - `tooltip` = The hover message, accepts a string or text component/mini message. - `width` = The width of the button. Value between 1 and 1024 — Defaults to 150. - `trigger` = This section will run code when the button is clicked.
**Callback Section Event-Values**: - `event-nbt` = Returns NBT from the event (will contain data from inputs). - `event-audience` = The audience represented in this event. - `event-playerconnection` = The player connection represented in this event (Used if opening a dialog in the async player connection config evnet). - `event-player` = The player represented in this event (Might be null if the player isn't available yet, such as in the async config event). - `event-string` = The name of the player/player connection represented in this event (Useful if the player is null). - `event-uuid` - The uuid of the player/player connection represented in this event.
Examples
add callback action button:
label: "Spawn"
tooltip: "Teleport yoursel to spawn!"
trigger:
teleport event-player to spawn of world "world"