主选单与 HUD
云界面主选单的名牌(Lv. {level})和 HUD 默认显示原版等级。换成星月天职的 PlaceholderAPI 变量,就会显示职业等级和职业。需要 PlaceholderAPI。
主选单名牌
打开 plugins/CloudUI/screens/main.yml,找到 level 这个元素,把文字改成职业等级:
plugins/CloudUI/screens/main.yml(节录)
level:
type: text
text: 'Lv. %starvocation_level%'
存档后 /cui reload,打开主选单,名牌显示的就是职业等级。
HUD
plugins/CloudUI/config.yml(节录)
hud:
level: '%starvocation_level%'
title: '%starvocation_class_plain%'
mana: '%mmocore_mana%'
| 键 | 改成 |
|---|---|
level | %starvocation_level% 职业等级 |
title | %starvocation_class_plain% 称号位置显示职业名称(新玩家是「旅人」) |
mana | 原本写 %mmocore_mana% 的不用改 |
没装 MMOCore 时,星月天职会自己提供 %mmocore_*% 变量(config.yml 的 compat.mmocore-placeholders: true),所以原本给 MMOCore 写的设定照常显示职业的魔力。也可以直接换成 %starvocation_mana%。
其他能用的变量见变量,例如 %starvocation_max_mana%、%starvocation_exp_ratio%(0 到 1,给进度条用)。
会踩的坑
%starvocation_class% 带颜色码,放在只显示纯文字的地方会看到 § 符号,这种地方用 %starvocation_class_plain%。
同时装了 MMOCore 时星月天职不会注册 %mmocore_*%,那时 %mmocore_mana% 是 MMOCore 自己的数字。两个插件不要一起装。