SkDialogs

一个用于 Paper 的对话 API 的 Skript 插件,支持在 Minecraft 1.21.6 中新增的模态窗口。它提供了通过脚本构建和显示对话框的语法:包含文本字段、开关、滑块和下拉菜单的表单,可执行命令或打开其他对话框的按钮,以及收集玩家所有输入内容的点击事件。
例如,每位玩家在游玩前必须接受的服务器规则:
on join:
if {rules accepted::%player's uuid%} is true:
stop
create dialog "rules":
set title to "&6Server rules"
set close on escape to false
add body "&71. Be kind."
add body "&72. No griefing."
add button "accept" labeled "&2I accept the rules"
add button "decline" labeled "&cDecline"
show dialog "rules" to player
on dialog click "rules":
if the clicked button is "accept":
set {rules accepted::%event-player's uuid%} to true
send "&aThanks for accepting. Have fun!" to event-player
else:
kick event-player due to "&cYou must accept the rules to play."
安装
- 在 Paper 1.21.8 或更高版本上安装 Skript 2.15 或更新版本。
- 将 最新发行版 中的
skdialogs-<version>.jar 放入 plugins/ 目录。
- 重启服务器。
本页面的每个示例都是完整的。将其粘贴到 plugins/Skript/scripts/ 中的一个文件中,运行 /sk reload all,然后在游戏中尝试使用。examples/ 目录包含了所有这些示例文件,以及一些更复杂的示例。
工作原理
每个对话框都遵循相同的三个步骤。
create dialog "id": 定义一个对话框并将其注册到一个 ID 下。该部分内的行设置其标题、内容、输入项和按钮。
show dialog "id" to player 显示该对话框。同一个对话框可以多次显示给任何玩家。
on dialog click "id": 当按下按钮时触发。在此事件中,the clicked button 是按钮的 ID,而 dialog input "key" 是玩家输入的内容。
按钮还可以携带操作(执行命令、打开链接),从而完全跳过第 3 步。所有字符串都会经过 Skript 的聊天格式处理,与 send 相同:包括 & 颜色代码、十六进制颜色以及像 <translate:item.minecraft.filled_map> 这样的标签,每个客户端会以自己的语言进行渲染。
请求输入
对话框可以包含四种类型的输入:文本字段、开关、滑块和下拉菜单。每个输入都有一个键,点击处理器通过该键读取每个值。
command /character:
trigger:
create dialog "character":
set title to "Create your character"
add body "This cannot be changed later."
add text input "name" labeled "Name" with default "%player%" with max length 16
add toggle input "hardcore" labeled "Hardcore mode?" with default false
add slider input "level" labeled "Starting level" from 1 to 10 with step 1 with default 1
add dropdown input "class" labeled "Class" with options "knight", "ranger" and "mage" with default "knight"
add button "confirm" labeled "&2Confirm"
show dialog "character" to player
on dialog click "character":
set {_name} to dialog input "name"
set {_class} to dialog input "class"
set {_level} to dialog input "level"
send "&aWelcome, %{_name}% the %{_class}%, starting at level %{_level}%." to event-player
下拉菜单也可以列出其选项作为子部分,这样每个选项显示的标签可以与读取回的 ID 不同:
add dropdown input "class" labeled "Class":
option "knight" labeled "&fThe Knight" as default
option "ranger" labeled "&aThe Ranger"
option "mage" labeled "&bThe Mage"
自带操作的按钮
带有操作子句的按钮不需要点击处理器。它可以执行命令、打开链接、复制文本、预填充聊天框或打开另一个对话框。
command /menu:
trigger:
create dialog "menu":
set title to "&6Server menu"
add button labeled "&aSpawn" that runs "/spawn"
add button labeled "&bWiki" that opens "https://docs.papermc.io"
add button labeled "Copy server IP" that copies "play.example.com"
add button labeled "Message an admin" that suggests "/msg admin "
add exit button "close" labeled "Close"
show dialog "menu" to player
that runs 可以直接获取来自对话框的输入。$(key) 占位符会在点击时填充该输入的值,从而使对话框变成向命令提交数据的表单:
command /rename:
trigger:
create dialog "rename":
set title to "Rename yourself"
add text input "name" labeled "New name" with max length 16
add button labeled "&2Apply" that runs "/nick $(name)"
add exit button "cancel" labeled "Cancel"
show dialog "rename" to player
注意这里有两个替换过程。$(name) 由对话框在点击时填充,而 Skript 自己的 %player% 则在创建对话框时填充。
对话框菜单
add dialog "id" to the list 将一个对话框转换为菜单,其条目可以打开其他对话框。带有 that shows 的按钮可以链接回来,从而实现菜单循环。
command /hub:
trigger:
create dialog "hub-rules":
set title to "&e规则"
add body "1. 友善待人。2. 禁止破坏。3. 玩得开心。"
add button "back" labeled "← 返回" that shows "hub"
create dialog "hub-kit":
set title to "&a新手套装"
add button "warrior" labeled "战士"
add button "mage" labeled "法师"
add button "back" labeled "← 返回" that shows "hub"
create dialog "hub":
set title to "&6服务器大厅"
add dialog "hub-rules" to the list
add dialog "hub-kit" to the list
add exit button "close" labeled "关闭"
show dialog "hub" to player
on dialog click "hub-kit":
if the clicked button is "warrior" or "mage":
send "&a你选择了 %the clicked button% 套装。" to event-player
保持对话框打开
默认情况下,按下按钮后对话框会关闭。使用 set after click to keep open 可使其保留在屏幕上,这样玩家可以多次点击按钮,每次点击都会重新读取当前的输入值。
command /volume:
trigger:
create dialog "volume":
set title to "音乐音量"
set after click to keep open
add slider input "level" labeled "音量" from 0 to 100 with step 5 with default 50
add button "apply" labeled "应用"
add exit button "done" labeled "完成"
show dialog "volume" to player
on dialog click "volume":
if the clicked button is "apply":
set {volume::%event-player's uuid%} to dialog input "level"
send "&7音量已设置为 &f%{volume::%event-player's uuid%}%&7。" to event-player
语法参考
Skript 完整模式集(使用 Skript 自身表示法):[方括号] 表示可选内容,(a|b) 表示选择项,%string% 表示该类型的任意表达式。
创建对话框
(create|make) dialog [(named|with id)] %string%:
打开一个定义对话框的部分,并按给定的 ID 注册它。该部分主体仅运行一次,立即执行;其中仅允许使用以下效果。如果创建的对话框 ID 已存在,则会替换旧的对话框。
ID 是你在其他所有地方引用该对话框的方式:show dialog、on dialog click、that shows 以及 add dialog ... to the list。
属性
set [the] title [of [the] dialog] to %string%
set [the] external title [of [the] dialog] to %string%
set [the] columns [of [the] dialog] to %number%
set (closing|close) on escape [of [the] dialog] to %boolean%
set [the] after[ ]click [behaviour|behavior] [of [the] dialog] to (close|keep open|wait [for response])
| 属性 |
默认值 |
含义 |
title |
对话框的 ID |
显示在窗口顶部的文本。 |
external title |
title |
客户端在对话框外部列出该对话框时显示的标签。 |
columns |
2 |
多操作或列表对话框布局中按钮的列数。 |
close on escape |
true |
是否按 Escape 键关闭对话框。 |
after click |
close |
按下按钮后对话框的行为。 |
after click 的选项包括 close(对话框关闭)、keep open(保留在屏幕上,以便玩家可以多次点击按钮并每次重新读取输入)和 wait for response(变灰直到服务器回复)。
原版暂停菜单和快捷操作按钮来自加载时解析的数据包标签,因此运行时创建的对话框无法出现在其中。
主体内容
add [a] [plain] body %string% [with width %number%]
add [an] item body %itemstack% [with description %string%] [without tooltip] [without decorations] [sized %number% by %number%]
添加一行内容:一条消息或渲染的物品。物品的描述会显示在其旁边,without tooltip 隐藏其悬停提示框,without decorations 隐藏其数量和耐久度栏,sized 设置其渲染所在的框(宽 x 高,默认为 16x16,除非另行设置)。
输入控件
每个输入控件都有一个键(其在点击事件中的名称)和一个可选的 labeled 标签,默认为键名。
add text input %string% [labeled %string%] [with default %string%] [with max[imum] length %number%] [with width %number%] [multiline [up to %number% lines]]
add (boolean|toggle) input %string% [labeled %string%] [with default %boolean%] [with values %string% and %string%]
add (slider|number) input %string% [labeled %string%] (from|between) %number% (to|and) %number% [(by|with step) %number%] [with default %number%] [with format %string%] [with width %number%]
add (dropdown|choice) input %string% [labeled %string%] with options %strings% [with default %string%] [with width %number%]
| 输入类型 |
玩家看到的内容 |
dialog input "key" 返回值 |
text |
文本字段,配合 multiline 支持多行 |
输入的文本(max length 默认为 32) |
toggle |
开关 |
true 或 false |
slider |
给定范围内的滑块 |
数字 |
dropdown |
选项列表 |
所选选项的 ID |
没有默认值的滑块从范围的低端开始。with format 用于格式化滑块的标签,其中 {label} 和 {value} 标记替换位置,例如 with format "{value} blocks"。
toggle 的 with values 设置 $(key) 命令占位符在不同状态下的值,例如使用 "64" 和 "1" 代替 true 和 false。
下拉列表还可以将其选项列为一个部分,使每个选项显示与回读 ID 不同的标签:
add (dropdown|choice) input %string% [labeled %string%]:
option %string% [labeled %string%] [[as] [the] default]
按钮
add [a] button [%string%] [labeled %string%] [with tooltip %string%] [with width %number%] [that (runs|opens|copies|suggests|shows) %string%]
add [an] exit button [%string%] [labeled %string%] [with tooltip %string%] [with width %number%]
标签默认使用 id。按钮的功能取决于其动作子句:
| 子句 |
点击时 |
| none |
触发 on dialog click;此处需要 id,以便你在其中进行匹配。 |
that runs %string% |
以玩家身份运行命令。在点击时,$(key) 占位符会被填入该输入的值。 |
that opens %string% |
请求打开 URL。 |
that copies %string% |
将文本复制到剪贴板。 |
that suggests %string% |
在聊天框中预填文本。 |
that shows %string% |
打开具有该 id 的对话框。 |
退出按钮是多操作或列表对话框在其他按钮下方显示的单个“返回/取消”按钮;一个对话框最多只能有一个。
that runs 以玩家身份并以玩家的权限运行命令,且客户端会先要求玩家确认一条普通命令。需要比玩家更高权限的工作应放在 on dialog click 中处理。
对话框的布局由其按钮决定。没有按钮则是纯提示;一个按钮是带有该按钮的提示;一个按钮加一个退出按钮是“是/否”确认;更多按钮则是按配置列数显示的多操作对话框。设置 columns 会将确认对话框变回多操作对话框。
对话框列表
add dialog %string% to [the] list
add [the] server links to [the] list
通过 id 将另一个对话框作为条目添加到当前对话框的菜单中。包含任何列表条目的对话框会以列表形式显示:每个条目都是一个打开对应对话框的按钮。server links 则展示服务器广告链接列表。
服务器链接
add [a] server link labeled %string% to [url] %string%
add [a|the] (bug report|community guidelines|support|status|feedback|community|website|forums|news|announcements) server link to [url] %string%
(clear|delete) [all] [the] server links
管理服务器的链接列表,这些链接会在暂停菜单和 server links 对话框中的“Server Links”部分下显示。链接是全局的,因此 on load 是设置它们的自然位置。输入的链接由每个客户端以其自己的语言进行标记;带标签的链接显示你的文本,而 <translate:...> 标签也使其支持多语言。先清除再添加可以让重新加载的脚本重建列表,避免重复堆叠。
on load:
clear the server links
add server link labeled "<translate:item.minecraft.filled_map>" to "https://map.example.com"
add website server link to "https://example.com"
显示与关闭
(show|open) dialog %string% (to|for) %players%
close [the] [current] dialog (for|of|to) %players%
show dialog 显示已创建的对话框;向 all players 显示也可以。close dialog 关闭每个玩家当前打开的任何对话框(来自任何插件)。
点击事件
on dialog (click|submit|button click):
on dialog (click|submit) [(of|for)] %string%:
当玩家按下本插件创建的对话框上的事件按钮(即没有动作子句的按钮)时触发。可选的 id 可将事件限制为特定对话框。
在事件内部:
event-player # 提交对话框的玩家
[the] clicked [dialog] button # 被按下按钮的 id
[the] [clicked] dialog id # 对话框的 id
[the] [dialog] input [value] [(of|for)] %string% # 某个输入的值,通过 key 获取
[the] [dialog] value of [input] %string% # 同上,表述不同
输入的值可以是文本、布尔值或数字,与上述输入表一致。读取对话框不存在的 key 将返回空值。
构建
需要 JDK 25,这是 Paper 26.2 所需的版本(包装器会自动获取 Gradle 本身)。
./gradlew build
生成的 jar 包位于 build/libs/ 中。该插件针对 gradle.properties 中固定的确切 Paper 构建版本和 Skript 发布版本进行编译;若要跟随更新版本,请提升相应属性并修复不再编译的代码。
CI 会对每次推送和拉取请求进行构建,每周还有两个任务分别针对各依赖项的最新版本进行编译:paper-api 用于 Paper(其对话框 API 处于实验阶段),以及 skript-api 用于 Skript(后者正在弃用插件所基于的注册 API)。任一破坏性变更都会表现为失败的运行记录,而不是在服务器上突然出现意外。推送 vX.Y.Z 标签会将 jar 包附加到 GitHub Release 并发布至 Modrinth。
贡献
欢迎提交错误报告、功能请求和拉取请求。有关如何设置开发环境以及什么样的拉取请求是合格的,请参阅
CONTRIBUTING.md。
许可证
MIT
SkDialogs

A Skript addon for
Paper's dialog API, the modal windows
added to Minecraft in 1.21.6. It adds the syntax to build and
show them from a script: forms with text fields, toggles, sliders, and dropdowns, buttons that run
commands or open other dialogs, and a click event with everything the player entered.
For example, rules every player must accept before playing:
on join:
if {rules accepted::%player's uuid%} is true:
stop
create dialog "rules":
set title to "&6Server rules"
set close on escape to false
add body "&71. Be kind."
add body "&72. No griefing."
add button "accept" labeled "&2I accept the rules"
add button "decline" labeled "&cDecline"
show dialog "rules" to player
on dialog click "rules":
if the clicked button is "accept":
set {rules accepted::%event-player's uuid%} to true
send "&aThanks for accepting. Have fun!" to event-player
else:
kick event-player due to "&cYou must accept the rules to play."
Install
- Install Skript 2.15 or newer on Paper 1.21.8 or newer.
- Drop
skdialogs-<version>.jar from the
latest release into plugins/.
- Restart the server.
Every example on this page is complete. Paste one into a file in plugins/Skript/scripts/, run
/sk reload all, and try it in game. examples/ has all of them as files, plus a few
bigger ones.
How it works
Every dialog follows the same three steps.
create dialog "id": defines a dialog and registers it under an id. The lines inside the
section set its title, content, inputs, and buttons.
show dialog "id" to player displays it. One dialog can be shown many times, to any players.
on dialog click "id": fires when a button is pressed. Inside it, the clicked button is the
button's id and dialog input "key" is what the player entered.
Buttons can also carry an action (run a command, open a link) and then skip step 3 entirely. All
strings go through Skript's chat format, the same as send: & colour codes, hex colours, and
tags like <translate:item.minecraft.filled_map>, which each client renders in its own language.
Ask for input
A dialog can hold four kinds of input: a text field, a toggle, a slider, and a dropdown. Each input
has a key, and the click handler reads each value by that key.
command /character:
trigger:
create dialog "character":
set title to "Create your character"
add body "This cannot be changed later."
add text input "name" labeled "Name" with default "%player%" with max length 16
add toggle input "hardcore" labeled "Hardcore mode?" with default false
add slider input "level" labeled "Starting level" from 1 to 10 with step 1 with default 1
add dropdown input "class" labeled "Class" with options "knight", "ranger" and "mage" with default "knight"
add button "confirm" labeled "&2Confirm"
show dialog "character" to player
on dialog click "character":
set {_name} to dialog input "name"
set {_class} to dialog input "class"
set {_level} to dialog input "level"
send "&aWelcome, %{_name}% the %{_class}%, starting at level %{_level}%." to event-player
A dropdown can also list its choices as a section, so each choice shows a label different from the
id you read back:
add dropdown input "class" labeled "Class":
option "knight" labeled "&fThe Knight" as default
option "ranger" labeled "&aThe Ranger"
option "mage" labeled "&bThe Mage"
Buttons that act on their own
A button with an action clause needs no click handler. It runs a command, opens a link, copies text,
pre-fills the chat box, or opens another dialog.
command /menu:
trigger:
create dialog "menu":
set title to "&6Server menu"
add button labeled "&aSpawn" that runs "/spawn"
add button labeled "&bWiki" that opens "https://docs.papermc.io"
add button labeled "Copy server IP" that copies "play.example.com"
add button labeled "Message an admin" that suggests "/msg admin "
add exit button "close" labeled "Close"
show dialog "menu" to player
that runs can take input straight from the dialog. A $(key) placeholder is filled with that
input's value at click time, which turns a dialog into a form that submits to a command:
command /rename:
trigger:
create dialog "rename":
set title to "Rename yourself"
add text input "name" labeled "New name" with max length 16
add button labeled "&2Apply" that runs "/nick $(name)"
add exit button "cancel" labeled "Cancel"
show dialog "rename" to player
Note the two substitutions in play. $(name) is filled by the dialog when clicked, while Skript's
own %player% is filled when the dialog is created.
A menu of dialogs
add dialog "id" to the list turns a dialog into a menu whose entries open other dialogs. A button
with that shows links back, so the menu loops.
command /hub:
trigger:
create dialog "hub-rules":
set title to "&eRules"
add body "1. Be kind. 2. No griefing. 3. Have fun."
add button "back" labeled "← Back" that shows "hub"
create dialog "hub-kit":
set title to "&aStarter kit"
add button "warrior" labeled "Warrior"
add button "mage" labeled "Mage"
add button "back" labeled "← Back" that shows "hub"
create dialog "hub":
set title to "&6Server hub"
add dialog "hub-rules" to the list
add dialog "hub-kit" to the list
add exit button "close" labeled "Close"
show dialog "hub" to player
on dialog click "hub-kit":
if the clicked button is "warrior" or "mage":
send "&aYou chose the %the clicked button% kit." to event-player
Keep the dialog open
By default a dialog closes when a button is pressed. set after click to keep open leaves it on
screen, so a player can press a button several times and each click re-reads the inputs as they
stand.
command /volume:
trigger:
create dialog "volume":
set title to "Music volume"
set after click to keep open
add slider input "level" labeled "Volume" from 0 to 100 with step 5 with default 50
add button "apply" labeled "Apply"
add exit button "done" labeled "Done"
show dialog "volume" to player
on dialog click "volume":
if the clicked button is "apply":
set {volume::%event-player's uuid%} to dialog input "level"
send "&7Volume set to &f%{volume::%event-player's uuid%}%&7." to event-player
Syntax reference
The complete set of patterns, in Skript's own notation: [square brackets] are optional, (a|b)
is a choice, and %string% is any expression of that type.
Create a dialog
(create|make) dialog [(named|with id)] %string%:
Opens a section that defines a dialog and registers it under the given id. The section body runs
once, immediately; only the effects below are valid inside it. Creating a dialog with an id that
already exists replaces the old one.
The id is how you refer to the dialog everywhere else: show dialog, on dialog click,
that shows, and add dialog ... to the list.
Properties
set [the] title [of [the] dialog] to %string%
set [the] external title [of [the] dialog] to %string%
set [the] columns [of [the] dialog] to %number%
set (closing|close) on escape [of [the] dialog] to %boolean%
set [the] after[ ]click [behaviour|behavior] [of [the] dialog] to (close|keep open|wait [for response])
| Property |
Default |
Meaning |
title |
the dialog's id |
Text shown at the top of the window. |
external title |
the title |
Label shown where a client lists the dialog outside itself. |
columns |
2 |
How many columns of buttons a multi-action or list dialog lays out. |
close on escape |
true |
Whether the escape key closes the dialog. |
after click |
close |
What the dialog does once a button is pressed. |
The after click choices are close (the dialog closes), keep open (it stays on screen, so a
player can press a button several times and each click re-reads the inputs), and wait for response
(it greys out until the server replies).
Vanilla's pause-menu and quick-action buttons come from data pack tags resolved at load, so dialogs
created at runtime cannot appear there.
Body
add [a] [plain] body %string% [with width %number%]
add [an] item body %itemstack% [with description %string%] [without tooltip] [without decorations] [sized %number% by %number%]
Adds a line of content: a message, or a rendered item. An item's description is shown next to it,
without tooltip hides its hover tooltip, without decorations hides its count and durability
bar, and sized sets the box it renders in (width by height, 16 by 16 unless set).
Inputs
Every input takes a key (its name in the click event) and an optional labeled label, which
defaults to the key.
add text input %string% [labeled %string%] [with default %string%] [with max[imum] length %number%] [with width %number%] [multiline [up to %number% lines]]
add (boolean|toggle) input %string% [labeled %string%] [with default %boolean%] [with values %string% and %string%]
add (slider|number) input %string% [labeled %string%] (from|between) %number% (to|and) %number% [(by|with step) %number%] [with default %number%] [with format %string%] [with width %number%]
add (dropdown|choice) input %string% [labeled %string%] with options %strings% [with default %string%] [with width %number%]
| Input |
Player sees |
dialog input "key" returns |
text |
a text field, multi-line with multiline |
the entered text (max length defaults to 32) |
toggle |
an on/off switch |
true or false |
slider |
a slider over the given range |
a number |
dropdown |
a list of choices |
the chosen option's id |
A slider without a default starts at the low end of its range. with format shapes the slider's
label, with {label} and {value} marking the substitutions, e.g. with format "{value} blocks".
A toggle's with values sets what a $(key) command placeholder becomes for each state, e.g.
with values "64" and "1" instead of true and false.
A dropdown can also list its choices as a section, so each choice shows a label different from the
id you read back:
add (dropdown|choice) input %string% [labeled %string%]:
option %string% [labeled %string%] [[as] [the] default]
Buttons
add [a] button [%string%] [labeled %string%] [with tooltip %string%] [with width %number%] [that (runs|opens|copies|suggests|shows) %string%]
add [an] exit button [%string%] [labeled %string%] [with tooltip %string%] [with width %number%]
The label defaults to the id. What a button does depends on its action clause:
| Clause |
On click |
| none |
Fires on dialog click; the id is required so you can match it there. |
that runs %string% |
Runs the command as the player. A $(key) placeholder is filled with that input's value at click time. |
that opens %string% |
Asks to open the url. |
that copies %string% |
Copies the text to the clipboard. |
that suggests %string% |
Pre-fills the chat box with the text. |
that shows %string% |
Opens the dialog with that id. |
The exit button is the single back/cancel button a multi-action or list dialog shows below the
others; a dialog can have at most one.
that runs runs the command as the player, with the player's permissions, and the client asks the
player to confirm a plain command first. Work that needs more permission than the player has
belongs in on dialog click instead.
How the dialog is laid out follows from its buttons. No buttons is a plain notice; one button is a
notice with that button; one button plus an exit button is a yes/no confirmation; anything more is
a multi-action dialog in the configured columns. Setting columns turns a confirmation back into
a multi-action.
Dialog lists
add dialog %string% to [the] list
add [the] server links to [the] list
Adds another dialog, by id, as an entry in this dialog's menu. A dialog with any list entries is
shown as a list: each entry is a button that opens that dialog. server links instead presents
the link list the server advertises.
Server links
add [a] server link labeled %string% to [url] %string%
add [a|the] (bug report|community guidelines|support|status|feedback|community|website|forums|news|announcements) server link to [url] %string%
(clear|delete) [all] [the] server links
Manages the server's link list, shown under "Server Links" in the pause menu and in a
server links dialog. Links are server-wide, so on load is the natural place to set them. A
typed link is labelled by each client in its own language; a labeled link shows your text, and a
<translate:...> tag makes that per-language too. Clearing first lets a reloading script rebuild
the list without stacking duplicates.
on load:
clear the server links
add server link labeled "<translate:item.minecraft.filled_map>" to "https://map.example.com"
add website server link to "https://example.com"
Show and close
(show|open) dialog %string% (to|for) %players%
close [the] [current] dialog (for|of|to) %players%
show dialog displays a created dialog; showing to all players works too. close dialog closes
whatever dialog each player has open, from any plugin.
The click event
on dialog (click|submit|button click):
on dialog (click|submit) [(of|for)] %string%:
Fires when a player presses an event button (one with no action clause) on a dialog this addon
created. The optional id restricts the event to one dialog.
Inside the event:
event-player # the player who submitted the dialog
[the] clicked [dialog] button # the pressed button's id
[the] [clicked] dialog id # the dialog's id
[the] [dialog] input [value] [(of|for)] %string% # one input's value, by key
[the] [dialog] value of [input] %string% # the same, worded differently
An input's value is a text, a boolean, or a number, matching the inputs table above. Reading a key
the dialog does not have gives nothing.
Build
Requires a JDK 25, the version Paper 26.2 needs (the wrapper fetches Gradle itself).
./gradlew build
The jar lands in build/libs/. The addon compiles against the exact Paper build and Skript
release pinned in gradle.properties; to follow a newer one, bump that property and fix whatever
no longer compiles.
CI builds every push and pull request, and two weekly jobs compile against the latest release of
each dependency: paper-api for Paper, whose dialog API is experimental, and skript-api for
Skript, which is retiring the registration API addons build on. Either break shows up as a failed
run instead of a surprise on a server. Pushing a vX.Y.Z tag attaches the jar to a GitHub release
and publishes it to Modrinth.
Contributing
Bug reports, feature requests, and pull requests are welcome. See
CONTRIBUTING.md for how to set up a dev environment and what a good pull request
looks like.
License
MIT
评论 0
登录后参与评分
还没有评论,来抢沙发吧