Example: stamina bar

before:

after:

Step 1

Move the image and text up

plugins\CustomNameplates\contents\images\coin.yml

image: coin
height: 10
ascent: -14 → -5
width: 10
plugins\CustomNameplates\configs\custom-placeholders.yml

descent-text:
  money:
    text: "%vault_eco_balance%"
    descent: 23 → 14
    is-unicode: false

Now reload the plugin and reinstall the resource pack to see the changes

Step 2

Default config hides the money when players are in water but in this case we don't have to hide it

plugins\CustomNameplates\configs\custom-placeholders.yml

# before
conditional-text:
  actionbar:
    priority_1:
      text: '%nameplates_background_other_actionbar%'
      conditions:
        '||':
          '!=':
            value1: '%player_remaining_air%'
            value2: "300"
          '!gamemode': survival
    priority_2:
      text: '%nameplates_static_money_hud%%nameplates_offset_-180%%nameplates_static_other_actionbar%'
      conditions:
        '!equals':
          value1: '%nameplates_actionbar%'
          value2: ""
    priority_3:
      text: '%nameplates_static_money_hud%'

# after
conditional-text:
  actionbar:
    priority_1:
      text: '%nameplates_static_money_hud%%nameplates_offset_-180%%nameplates_static_other_actionbar%'
      conditions:
        '||':
          '!=':
            value1: '%player_remaining_air%'
            value2: "300"
          '!gamemode': survival
    priority_2:
      text: '%nameplates_static_money_hud%%nameplates_offset_-180%%nameplates_static_other_actionbar%'
      conditions:
        '!equals':
          value1: '%nameplates_actionbar%'
          value2: ""
    priority_3:
      text: '%nameplates_static_money_hud%'

Now reload the configs and see the result

Step 3

Add stamina bar

Method 1: Since we know that the width of this hud is fixed, we can use %nameplates_offset_100%%nameplates_vanilla_stamina_hud% to add another line

conditional-text:
  actionbar:
    priority_1:
      text: '%nameplates_static_money_hud%%nameplates_offset_-180%%nameplates_static_other_actionbar%'
      conditions:
        '||':
          '!=':
            value1: '%player_remaining_air%'
            value2: "300"
          '!gamemode': survival
    priority_2:
      text: '%nameplates_offset_100%%nameplates_vanilla_stamina_hud%%nameplates_offset_-180%%nameplates_static_money_hud%%nameplates_offset_-180%%nameplates_static_other_actionbar%'
      conditions:
        '!equals':
          value1: '%nameplates_actionbar%'
          value2: ""
    priority_3:
      text: '%nameplates_offset_100%%nameplates_vanilla_stamina_hud%%nameplates_offset_-180%%nameplates_static_money_hud%'

Method 2: We can also use static text

static-text:
  stamina_hud:
    position: right
    text: '%nameplates_vanilla_stamina_hud%'
    value: 180
conditional-text:
  actionbar:
    priority_1:
      text: '%nameplates_static_money_hud%%nameplates_offset_-180%%nameplates_static_other_actionbar%'
      conditions:
        '||':
          '!=':
            value1: '%player_remaining_air%'
            value2: "300"
          '!gamemode': survival
    priority_2:
      text: '%nameplates_static_stamina_hud%%nameplates_offset_-180%%nameplates_static_money_hud%%nameplates_offset_-180%%nameplates_static_other_actionbar%'
      conditions:
        '!equals':
          value1: '%nameplates_actionbar%'
          value2: ""
    priority_3:
      text: '%nameplates_static_stamina_hud%%nameplates_offset_-180%%nameplates_static_money_hud%'

Last updated