配置文件 config.yml
位置:plugins/CloudUI/config.yml。改完执行 /cui reload。
default-screen
default-screen: main
只输入 /cui 或 /cui open 时打开的画面 ID(screens/ 里的文件名,不含 .yml)。
pack:资源包
pack:
mode: auto
reduce-colours: false
colour-error: 6
folder: resource_pack
craftengine:
auto-register: true
auto-reload: true
reload-command: 'ce reload all'
url: 'http://127.0.0.1:8164/'
bind: '0.0.0.0'
port: 8164
send-on-join: true
required: false
prompt: '此伺服器的選單介面需要資源包'
| 选项 | 默认 | 说明 |
|---|---|---|
mode | auto | auto:有 CraftEngine 交给 CraftEngine,没有就自己发送;self:自己发送;craftengine:一定交给 CraftEngine;external:由其他插件合并发送 |
reduce-colours | false | 把画面图片减成每块最多 256 色,资源包约小一半 |
colour-error | 6 | 减色时允许的最大色差(0–255,建议 4–8;越大资源包越小、越可能看出色阶) |
folder | resource_pack | 解压后的资源包文件夹(插件文件夹内),给 CraftEngine 等合并用 |
craftengine.auto-register | true | 自动把资源包文件夹加进 CraftEngine 的 resource-pack.merge-external-folders(先备份成 config.yml.cloudui-backup) |
craftengine.auto-reload | true | 资源包有变动时自动执行 reload-command |
craftengine.reload-command | ce reload all | 让 CraftEngine 重新打包并发送的指令 |
url | http://127.0.0.1:8164/ | 自己发送时玩家下载资源包的网址(结尾要有 /),对外开放时改成公网 IP 或网域 |
bind / port | 0.0.0.0 / 8164 | 自己发送时 HTTP 服务的监听位址与端口。端口被其他程序占用时(例如同一台机器开了好几个服),自动改用下一个空的端口(最多试 20 个),并在控制台提示实际用的端口;对外开放时记得开放那个端口,或自己指定 pack.port |
send-on-join | true | 玩家进服时自动发送 |
required | false | 是否强制玩家接受资源包 |
prompt | — | 发送资源包时显示的提示文字 |
拒绝资源包或下载失败的玩家会自动改用 箱子选单。
fonts:字体
画面的 text 元素用 font: text 或 font: title 选字体;字会画进资源包,所以要决定放哪些字。
fonts:
text:
file: ''
size: 32
shadow: true
charsets: [ascii, punctuation]
common: true
extra: ''
title:
file: ''
size: 64
shadow: true
charsets: [ascii]
extra: ''
| 选项 | 说明 |
|---|---|
file | 留空 = 内置 Noto Sans SC(SIL OFL 授权);也可以把自己的 .ttf 放进 plugins/CloudUI/fonts/,填相对路径 |
size | 字形解析度(像素)。画面文字大小会选最接近 size 倍数(.375、.5、.5625、.625、.6875、.75、.875、1、1.125、1.25、1.5…)的值:text 用 32 时可得 12 / 16 / 18 / 20 / 22 / 24 / 28 / 32 / 36 / 40 / 48 像素;title 用 64 给大标题 |
shadow | 文字阴影 |
charsets | 要放进资源包的字集,见下表 |
common | 只有 text:自动加入常用字(简体版为 GB2312 常用字),信件标题、公会名称、物品名称这类插件执行时才给的文字才不会缺字。设 false 资源包可小约 0.5~0.9 MB,但缺的字会显示成怪符号 |
extra | 额外要加入的字,直接写在引号里 |
画面文件里写死的文字会自动加入,不用另外填。title 字体缺的字(例如插件执行时才给的大标题文字),会改用 text 字体的字形、按 title 的字高画出来,不会变小或空白。
| 字集 | 内容 |
|---|---|
ascii | 英文、数字、半形符号 |
punctuation | 常用全形标点 |
gb2312-common | 常用简体 3755 字 |
gb2312 | 全部简体 6763 字 |
big5-common | 常用繁体 5401 字 |
zh-hant-common | 常用繁体约 7400 字 |
big5 | 全部繁体 13000+ 字(资源包大很多) |
缺字时
文字显示成方块或怪符号,代表那个字不在资源包里:保持 common: true,或把字加进 extra、或在 charsets 加入更大的字集,然后 /cui reload。
hud:常驻 HUD
hud:
enabled: false
screen: hud
menu-key-screen: main
title: 旅人
level: '{level}'
money: '%vault_eco_balance_commas%'
points: '%playerpoints_points_formatted%'
bound: '0'
values:
world: '%player_world%'
bars:
mana:
value: '%mmocore_mana%'
max: '%mmocore_stat_max_mana%'
| 选项 | 默认 | 说明 |
|---|---|---|
enabled | false | 开启常驻 HUD |
screen | hud | 当 HUD 的画面(screens/hud.yml) |
menu-key-screen | main | 蹲下 + F 打开的画面 |
title | 旅人 | HUD 里 {rank} 显示的文字 |
level | {level} | {lv} 的来源 |
money / points / bound | Vault、PlayerPoints、0 | {money}、{points}、{bound} 三种货币的来源 |
values | 自订数值:名称: '%变量%' → {名称} | |
bars | 自订条状:名称: {value, max} → {名称_step}(0~40)与 {名称_text} |
完整说明见 常驻 HUD。
editor:网页编辑器
editor:
url: 'http://127.0.0.1:8165/'
bind: '0.0.0.0'
port: 8165
/cui editor 产生的链接以 url 开头(结尾要有 /),要在别台电脑打开时改成服务器的公网 IP 或网域,并开放 port。见 网页编辑器。
cursor:游标
cursor:
default-sensitivity: 0
默认游标速度 0–3(对应 /cui sens 1–4);玩家用 /cui sens 设定后以玩家自己的为准。
menu:选单
menu:
ask-modded: true
require-ground: true
shift-f: close
| 选项 | 默认 | 说明 |
|---|---|---|
ask-modded | true | 装了模组的客户端(Fabric、Forge…)第一次打开选单时,用原版对话框问一次有没有开光影包:选「有开光影」就改用箱子选单并记住,选「没开」照常用云界面。之后玩家可以用 /cui classic 随时切换,见 箱子备援 |
require-ground | true | 只能站在地上打开选单(在空中打开时角色会卡在半空直到关闭)。水中、梯子、飞行、游泳与 cloudui.bypass.ground 权限不受限;在空中时会提示「請先落地再開啟選單」 |
shift-f | close | Shift 轻按 / F 键:close 直接关闭选单;back 回到上一个画面(第一个画面才关闭)。画面里的「返回」按钮用 back 动作 |
画面也可以用 back-to 指定返回目标,见 画面文件。
sounds:音效
sounds:
enabled: true
click: 'cloudui:ui.click 1 1'
open: 'cloudui:ui.open 1 1'
close: 'cloudui:ui.open 1 1'
mute-water: true
hover: ''
deny: 'block.note_block.bass 0.5 0.8'
格式:音效ID [音量] [音调],留空 = 不播放。可用原版音效(例如 ui.button.click)或资源包里的音效。
| 选项 | 说明 |
|---|---|
enabled | 选单音效总开关 |
click | 点击按钮。内置 cloudui:ui.click;放一个 Ogg Vorbis 文件到 plugins/CloudUI/sounds/ui_click.ogg 就会换成你的 |
open / close | 打开 / 关闭选单。内置 cloudui:ui.open;自定义放 sounds/ui_open.ogg |
mute-water | 消掉打开选单时产生的水声 |
hover | 游标移到按钮上,默认不播放 |
deny | 没有权限、花费不足时 |