Dialogs
Pop-up windows for duel requests, party invites, confirmations and menus, with a chat fallback.
Files: plugins/MineDuels/dialogs.yml and plugins/MineDuels/dialogs/. Reload: /md reload. The reference is dialogs.yml.
A dialog is a pop-up window the client shows in the middle of the screen. Minecraft 1.21.6 added them. MineDuels uses them for requests, confirmations and some menus. A client that cannot show dialogs gets the chat message or the chest menu instead, so nothing is lost.
Settings
enabled: true
duel-request:
enabled: true
chat: true
party-invite:
enabled: true
chat: true
layout-rename:
enabled: true
chat: false
confirm-disband: true
confirm-layout-delete: true
menus:
queue-unranked: false
queue-ranked: false
menu: true
settings: true| Key | Default | Meaning |
|---|---|---|
enabled | true | The master switch for all dialogs |
duel-request.enabled | true | Show a duel request as a dialog with Accept and Deny |
duel-request.chat | true | Also send the chat message, so the request is not missed |
party-invite.enabled, .chat | true | The party invite dialog. Accept runs /party accept, Decline closes it |
layout-rename.enabled, .chat | true, false | Asks for the new layout name in a dialog |
confirm-disband | true | Ask before /party disband |
confirm-layout-delete | true | Ask before a kit layout is deleted |
menus.<name> | see above | Show that menu as a dialog instead of a chest menu. The name is a file in dialogs/ |
Menus as dialogs
The files in dialogs/ define menus that can be shown as a dialog:
| File | Menu |
|---|---|
settings.yml | /settings |
menu.yml | The settings main menu |
queue-unranked.yml, queue-ranked.yml | The queue menus |
duel-rounds.yml | The rounds choice of a duel |
Turn a menu on in menus:
menus:
settings: true
queue-ranked: trueA dialog file has a title, body lines, buttons and options:
title: "<dark_gray>⚙ <#9BBEFF>Settings"
body:
- "<gray>Tap a setting to cycle it, <#C6DEF1>%player%<gray>."
columns: 2
can-close: true
pause: false
after-action: none
settings:
label: "<setting_icon><#E2E8F0><setting_name><reset> <dark_gray>· <value>"
tooltip: "<setting_description><newline><newline><dark_gray>Now <reset><value><newline><dark_gray>Next <reset><next>"
exit-label: "<#F08080>Close"| Key | Meaning |
|---|---|
title, body | MiniMessage. %player% works |
columns | Buttons per row |
can-close | Escape closes the dialog |
pause | Pause the game while open (single player only). Must be false with after-action: none |
after-action | After a click: close, none (stay open) or wait_for_response |
settings.label, settings.tooltip | One button per setting. Tags: <setting_icon>, <setting_name>, <setting_description>, <value>, <next>, <step_hint>, <reset>, <newline> |
exit-label | The text of the close button |
Texts
The dialog texts such as the Accept button are in messages.yml under dialog, for example dialog.duel-request.title, .body and .confirm. The duel request body can use <player>, <kit_display>, <arena>, <rounds> and <seconds>.
Custom menus and dialogs
A custom menu item can open a dialog with [dialog] <name>.
Clients
Dialogs need a client of Minecraft 1.21.6 or newer. On a server with ViaVersion, MineDuels checks the client's real version and uses the chat or chest menu for older clients.