Dialog - Dynamic Run Command Action Button (Section) — SkBee
Addon: SkBee · Category: Section · Since: 3.16.0
Syntax
add dynamic run command action buttonDescription
Add a dynamic run command action button to a dialog. See [**Dynamic Run Command Action**](https://minecraft.wiki/w/Dialog#dynamic/run_command) on McWiki for more specific info. This action will run a command using your command template and provided macros. The template format looks for `$(dialog_input_key)` to substitute macros (Must include at least ONE macro). The `input_key` is the key you used for your inputs. **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. - `template` = The command template including macros that will run when clicked.
Examples
command /message:
trigger:
open multi action dialog to player:
title: "Send a message:"
inputs:
add text input:
key: "name_input"
label: "Player Name"
add text input:
key: "text_input"
label: "Message to send"
actions:
add dynamic run command action button:
label: "Send Message"
width: 100
template: "/msg $(name_input) $(text_input)"