idHUD 唯一 ID可选- 类型
- 文本
- 默认
- 文件相对路径
hud 动作引用的 ID,同 hud 目录不重复。
示例status复用外观用 template,复用动作用 call,复用条件用 named;这三种引用有不同的合并和作用域规则。
templates/ 相对路径去扩展名就是引用名,模板内的 id 不改变引用名。覆盖 children/components/actions/states 会替换整份列表,不会追加。
扩展后的组件仍接受对应渲染器校验;互斥状态按 priority 从小到大选首个匹配,保留 visible: true 回退。
# templates/custom_button.yml
id: custom_button
type: button
height: 27
skin: button
text: '@common.back'
actions:
- type: back
# 菜单 components 中的引用
# - template: custom_button
# id: leave_page
# text: '@common.close'
# actions:
# - type: closefunctions/ 中参数是对象默认值,不是菜单 parameters 的校验列表。call.arguments 覆盖后以 arg.* 读取,return 提供 output。
# functions/custom_reward.yml
id: custom_reward
parameters:
material: BREAD
actions:
- type: return
value: '{arg.material}'
# 按钮 actions 片段
# - type: call
# function: custom_reward
# arguments:
# material: GOLDEN_CARROT
# output: reward.material
# - type: give-item
# item:
# material: '{reward.material}'
# amount: 1规则纯判断不会自动发奖励。require 会检查并执行条件树反馈;普通 visible 只决定显示。
# rules/custom_access.yml
id: custom_access
type: all
conditions:
- type: permission
permission: '{arg.permission}'
- type: level
min: 5
# 在菜单 requirements 中引用
# type: named
# rule: custom_access
# arguments:
# permission: futureui.useidHUD 唯一 ID可选hud 动作引用的 ID,同 hud 目录不重复。
示例statuschannel显示通道可选actionbar 快捷栏提示、bossbar 顶部条、subtitle 主副标题、tab 玩家列表页眉页脚。
示例bossbartext正文文字可选没有 frames 时使用,可读取当前玩家变量。
示例@hud.statusframes动画文字帧可选按 frame-ticks 轮换;不改变业务状态。
示例['@hud.status', '@common.ready']frame-ticks帧轮换间隔可选20 tick 约 1 秒;最小按 1 处理。
示例20refresh-ticksHUD 刷新间隔可选绘制时重新计算变量,过小会增加持续开销。
示例20duration-seconds显示总秒数可选0 持续显示,直到 hide-hud、替换或玩家离线。
示例30colorBossBar 颜色可选使用 BossBar 颜色,如 PINK/BLUE/RED/GREEN/YELLOW/PURPLE/WHITE。
示例GREENprogressBossBar 比例可选0–1;50% 写 0.5,绘制时钳制范围。
示例{player.health-fraction}title标题通道主标题可选channel: subtitle 时,text 作为副标题,此项为主标题。
示例@common.readyfooterTAB 页脚可选channel: tab 使用,text 是页眉,此项是页脚。
示例@common.ready保存为 hud/custom_health.yml,通过 hud 动作引用 custom_health;hide-hud 停止。其他插件可能也写同一显示通道。
id: custom_health
channel: bossbar
color: GREEN
text: '{player.name} · {player.health}/{player.max-health}'
progress: '{player.health-fraction}'
refresh-ticks: 20
duration-seconds: 0