耐力条
最后更新于
最后更新于
改前:
改后:
将图像和文本向上移动
/contents/images/coin.yml
image: coin
height: 10
ascent: -14 → -5
config.yml
shift_2:
- "space"
- "ascii:-6"
现在重新加载插件并重新安装资源包以查看更改
默认配置在玩家处于水中时隐藏金钱,但在这种情况下我们不必隐藏它。
plugins\CustomNameplates\configs\custom-placeholders.yml
# 之前
conditional-text:
actionbar:
priority_1:
text: '%np_background_other_actionbar%'
conditions:
'||':
'!=':
value1: '%player_remaining_air%'
value2: "300"
'!gamemode': survival
priority_2:
text: '%np_static_money_hud%%np_offset_-179%%np_static_other_actionbar%'
conditions:
'!equals':
value1: '%np_actionbar%'
value2: ""
priority_3:
text: '%np_static_money_hud%'
# 之后
conditional-text:
actionbar:
priority_1:
text: '%np_static_money_hud%%np_offset_-180%%np_static_other_actionbar%'
conditions:
'||':
'!=':
value1: '%player_remaining_air%'
value2: "300"
'!gamemode': survival
priority_2:
text: '%np_static_money_hud%%np_offset_-180%%np_static_other_actionbar%'
conditions:
'!equals':
value1: '%np_actionbar%'
value2: ""
priority_3:
text: '%np_static_money_hud%'
现在重新加载配置文件并查看结果。
添加耐力条
方法 1: 由于我们知道此 HUD 的宽度是固定的,我们可以使用 %nameplates_offset_100%%nameplates_vanilla_stamina_hud%
来添加另一行
conditional-text:
actionbar:
priority_1:
text: '%np_static_money_hud%%np_offset_-180%%np_static_other_actionbar%'
conditions:
'||':
'!=':
value1: '%player_remaining_air%'
value2: "300"
'!gamemode': survival
priority_2:
text: '%np_offset_100%%np_vanilla_stamina_hud%%np_offset_-180%%np_static_money_hud%%np_offset_-180%%np_static_other_actionbar%'
conditions:
'!equals':
value1: '%np_actionbar%'
value2: ""
priority_3:
text: '%np_offset_100%%np_vanilla_stamina_hud%%np_offset_-180%%np_static_money_hud%'
方法 2: 我们也可以使用静态文本
static-text:
stamina_hud:
position: right
text: '%np_vanilla_stamina_hud%'
value: 180
conditional-text:
actionbar:
priority_1:
text: '%np_static_money_hud%%np_offset_-180%%np_static_other_actionbar%'
conditions:
'||':
'!=':
value1: '%player_remaining_air%'
value2: "300"
'!gamemode': survival
priority_2:
text: '%np_static_stamina_hud%%np_offset_-180%%np_static_money_hud%%np_offset_-180%%np_static_other_actionbar%'
conditions:
'!equals':
value1: '%np_actionbar%'
value2: ""
priority_3:
text: '%np_static_stamina_hud%%np_offset_-180%%np_static_money_hud%'