-
Notifications
You must be signed in to change notification settings - Fork 0
Indicator Configuration
Noogear edited this page Mar 19, 2026
·
7 revisions
每个 YAML 文件中的顶层键为 tag 名称,事件映射脚本通过 tag 引用对应的指示器配置。匹配不到时回退到 default。
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
text-format |
String | <white>{damage} |
MiniMessage 模板,{damage} 替换为格式化后的数值。支持嵌入 PAPI 占位符,在加载时一次性解析 |
decimal-places |
int | 1 |
数值保留的小数位数 |
position |
Enum | AIM |
生成位置算法(见下方枚举表) |
animation |
String | null | 关联的动画定义名称(引用 animations/*.yml) |
billboard |
Enum | CENTER |
TextDisplay 朝向约束 |
see-through |
boolean | false |
是否穿透方块渲染 |
text-shadow |
boolean | true |
是否显示文字阴影 |
background |
int | 0x00000000 |
ARGB 背景颜色(0xAARRGGBB 或十进制,0x00000000 = 完全透明) |
view-range |
float | 1.0 |
客户端可见距离倍率 |
teleport-duration |
int | 0 |
位置/旋转插值 tick 数(0 = 立即传送) |
brightness |
int | -1 |
亮度覆盖(-1 = 使用世界光照) |
shadow-radius |
float | 0 |
地面阴影半径 |
shadow-strength |
float | 1.0 |
地面阴影强度 |
glow-color |
int | 0 |
发光颜色覆盖(RGB,0 = 默认白色) |
line-width |
int | 200 |
文本最大行宽(像素) |
only-player |
boolean | true |
仅在攻击者为玩家时触发 |
number-format |
String | null | 数字量化缩写规则名称(引用 number-format.yml) |
char-replace |
String | null | 字符替换规则名称(引用 char-replace.yml) |
| 值 | 适用场景 |
|---|---|
AIM |
近战、有向技能:指示器出现在来源(source)瞄准方向上,贴近目标(target)朝向来源的一侧表面。对投射物同样适用。 |
SURFACE |
群伤、爆炸、DoT 跳伤:指示器出现在目标(target)身体表面离来源(source)最近的点,无需方向信息,适合来源不明确的伤害。 |
IMPACT |
精确近战命中、投射物撞击(≤5 格有效范围):指示器出现在视线与目标(target)碰撞体的真实交点处。不适合远程弓箭/狙击等长距离攻击。 |
SOURCE_ORIGIN |
治愈数字、自 buff、反伤(荆棘)、连击浮字:指示器出现在来源(source)的眼睛位置或精确位置,而非目标身上。对投射物同样适用。 |
TARGET_EYE |
指示器出现在目标(target)的眼睛高度。适用于需要精确对准目标头部的场景。(若对方没有头部则自动回退为BOTTOM) |
TARGET_BOTTOM |
指示器出现在目标(target)的脚底位置。适用于需要贴地显示的场景。 |
| 值 | 说明 |
|---|---|
FIXED |
固定在世界空间 |
VERTICAL |
仅竖直旋转 |
HORIZONTAL |
仅水平旋转 |
CENTER |
总是面向玩家 |
当 config.yml 中 integrations.luckperms.enabled: true 且指示器的 only-player 为 true(默认)时,可在任意 tag 下增加 variants 列表。系统按顶至底匹配第一个满足权限的变体,其余忽略;均不满足则回退到基础配置。
ENTITY_ATTACK:
text-format: "<white>{damage}"
animation: arc_toss
# 权限变体列表:按顺序匹配,第一个满足权限的变体生效
variants:
- permission: "warriorview.indicator.svip"
text-format: "<gradient:gold:light_purple>{damage}</gradient>"
animation: spring_bounce
- permission: "warriorview.indicator.vip"
text-format: "<gold><bold>⚔ {damage}</bold>"
animation: spring_bounce变体中未填写的字段自动继承父层 tag 的配置。当 LuckPerms 未安装或已禁用时,
variants列表全部被忽略。 详见 集成说明。
default:
text-format: "<white>{damage}"
decimal-places: 1
position: AIM
animation: critical_hit
billboard: CENTER
see-through: true
text-shadow: true
background: 0x00000000
view-range: 32.0
only-player: true
number-format: compact # 引用 number-format.yml 中的规则
char-replace: double-struck # 引用 char-replace.yml 中的规则# damage-indicator.yml
default:
text-format: "<white>{damage}"
animation: float_fade
CRITICAL:
text-format: "<red><bold>✦ {damage} ✦"
animation: critical_hit
FIRE:
text-format: "<gold>🔥 {damage}"
animation: float_fade
POISON:
text-format: "<dark_green>☠ {damage}"
animation: float_fade