Dialog Inputs
Dialog inputs allow you to collect information from players through interactive form elements. All input values can be accessed in actions using placeholders.
Available Input Types
Text Input (dialog_text
)
dialog_text
)Collect text input from players with single or multi-line support.
inputs:
player_feedback:
type: dialog_text
label: "&6Share your thoughts about our server:"
width: 400
label-visible: true
initial-value: "This server is amazing because..."
max-length: 200
multiline:
max-lines: 4
height: 80
Options:
label
- Text shown above the input fieldwidth
- Input field width in pixelslabel-visible
- Whether to show the labelinitial-value
- Pre-filled textmax-length
- Maximum character limitmultiline
- Multi-line text area configurationmax-lines
- Maximum number of linesheight
- Height in pixels
Accessing value: %player_feedback%
Boolean Input (dialog_boolean
)
dialog_boolean
)Present a true/false choice to players.
inputs:
newsletter:
type: dialog_boolean
label: "&eWould you like to receive server updates?"
initial-value: true
text-true: "&a&lYES, keep me updated!"
text-false: "&c&lNo, thanks."
Options:
label
- Question or prompt textinitial-value
- Default selection (true/false)text-true
- Text for the "true" optiontext-false
- Text for the "false" option
Accessing value: %newsletter%
(returns "true" or "false")
Single Option Selection (dialog_single_option
)
dialog_single_option
)Allow players to choose one option from multiple choices.
inputs:
gamemode:
type: dialog_single_option
label: "&6What's your favorite game mode?"
label-visible: true
options:
option1:
id: "survival"
display: "&2🌱 Survival Mode"
initial: true
option2:
id: "creative"
display: "&6🎨 Creative Mode"
initial: false
option3:
id: "adventure"
display: "&5⚔️ Adventure Mode"
initial: false
option4:
id: "pvp"
display: "&c⚡ PvP Arena"
initial: false
Options:
label
- Question or prompt textlabel-visible
- Whether to show the labeloptions
- Available choicesid
- Unique identifier for the optiondisplay
- Text shown to the playerinitial
- Whether this option is selected by default
Accessing value: %gamemode%
(returns the selected option's id
)
Number Range (dialog_number_range
)
dialog_number_range
)Let players select a number within a specified range.
inputs:
playtime:
type: dialog_number_range
label: "&eHow many hours do you play per day?"
label-format: "options.generic_value"
width: 350
start: 1
end: 12
step: 1
initial-value: 3
Options:
label
- Question or prompt textlabel-format
- Display format for the current valuewidth
- Slider width in pixelsstart
- Minimum valueend
- Maximum valuestep
- Increment/decrement stepinitial-value
- Default selected value
Accessing value: %playtime%
(returns the selected number)
Using Input Values in Actions
All input values are automatically available as placeholders in your dialog actions:
actions:
1:
success:
- type: message
messages:
- "&aThank you for your feedback!"
- "&7Text: &f%player_feedback%"
- "&7Newsletter: &f%newsletter%"
- "&7Favorite mode: &f%gamemode%"
- "&7Daily playtime: &f%playtime% hours"
Conditional Content
You can use requirements and placeholders to show different content based on conditions:
inputs:
vip_feedback:
type: dialog_text
label: "&6VIP Members: Share your exclusive feedback!"
width: 400
label-visible: true
initial-value: "As a VIP, I think..."
max-length: 200
multiline:
max-lines: 4
height: 80
view-requirements:
- type: permission
permission: "zmenu.vip"
else:
type: dialog_text
label: "&7Share your feedback (non-VIP):"
width: 400
label-visible: true
initial-value: "I think..."
max-length: 200
multiline:
max-lines: 4
height: 80
Input Validation
Text Input Validation
Automatic length validation based on
max-length
Empty input handling
Special character support
Boolean Input Validation
Always returns valid true/false values
No additional validation needed
Single Option Validation
Ensures one option is always selected
Returns the
id
of the selected option
Number Range Validation
Automatic range validation (stays within start/end bounds)
Step validation ensures valid increments
Best Practices
Use clear labels - Make it obvious what you're asking for
Set reasonable limits - Don't overwhelm players with too many options
Provide good defaults - Use sensible initial values
Keep it relevant - Only ask for information you'll actually use
Test thoroughly - Ensure all input combinations work correctly
Styling Tips
Consistent widths - Use similar widths for related inputs
Appropriate sizing - Don't make inputs too small or too large
Visual grouping - Group related inputs together
Color coding - Use colors to indicate input importance or type
Last updated