Dialog UI Prompt
Use d: to build a native Paper dialog. Dialog prompts support text, number, choice, tab-completion, and compound layouts.
Text
An empty or unknown filter becomes a text field. text may be written explicitly.
<d:Question>
<d:text:Question>
<d:text[256,4,300]:Question>
<d:text[max_length=256,max_lines=4,width=300]:Question>Positional values are maxLength,maxLines,width. Keyed values may appear in any order. Each numeric override is clamped to 1–8192; max_lines > 1 enables multiline input.
Number
num, number, and numberrange are aliases.
<d:num[0,100]:Percentage>
<d:num[0,100,5]:Percentage>
<d:num[0,100,5,50]:Percentage>The positions are min,max,step,initial. If min >= max, the effective maximum becomes min + 1. A nonpositive step becomes 1. Without an inline initial value, an overridden range starts at its midpoint; explicit initial values are clamped into the range.
Choice
Blank options are discarded, the first remaining option is selected initially, and its display text is also the returned answer. Omitting the list uses DialogUI.Defaults.Choice.Default-Options.
Tab completion
CommandPrompter requests completions for the command assembled up to this prompt. One button is shown per completion when the count is between 1 and the effective threshold. Zero completions or too many completions opens a text-input fallback. The inline threshold has a minimum of 1.
d:tab cannot be used inside a compound dialog.
Compound layouts
Separate rows with top-level &&. Spaces around && are optional.
The available row filters are:
title
Sets the native dialog window title. The first title row wins.
None (0 answers)
body
Adds a plain text body element with automatic width.
None (0 answers)
body[300], body[plain,300], or body[plain,width=300]
Adds wrapped text with width clamped to 1–1024 pixels.
None (0 answers)
body[item]
Treats the display value as a Bukkit material and shows one item. Invalid materials fall back to Paper.
None (0 answers)
text[...]
Adds a text input.
Entered text
choice[...]
Adds a dropdown.
Selected option
num[...]
Adds a number range.
Selected number
title and body are compound-only. Using either as a standalone prompt sends an error and cancels the session.
Answer arity
In 3.2.0, layout rows (title and body) produce 0 answers and do not consume answer positions:
Multi-input dialogs produce exactly N answers (one per input row).
Info-only dialogs (containing only
titleandbodyrows) produce 0 answers.Zero-arity dialogs and layout rows never shift
{input:N}or{N}answer indices in post-commands.
Row-processing flags such as -ds, -iv:alias, -int, and -str are validated against actual input rows. The -t flag is extracted once for the whole compound and shows one Adventure title before the native dialog; it is separate from d:title, which sets the dialog window title.
Dialog lifecycle
Prompt dialogs cannot be dismissed with Escape. Client component actions—including MiniMessage open_url links in body text—leave the dialog open. Confirm, Cancel, Exit, or an answer button closes the dialog explicitly and then completes or cancels the session. Timeout, /cmdp cancel, reload, disconnect, and other server-side teardown can also close it; opening a link does not reset Prompt-Timeout.
With the default < > prompt delimiters, escape the nested MiniMessage delimiters so they do not terminate the outer prompt tag:
The backslashes are removed before MiniMessage renders the body. Another option is to configure non-angle prompt delimiters, such as {.*?}, so ordinary MiniMessage <click>...</click> tags do not conflict.
See Dialog UI settings.
Last updated
Was this helpful?