BetterHud 2.2-b04
  • BetterHud
  • OVERVIEW
    • Commands & Permissions
  • TUTORIALS
    • First install
    • Creating a new hud
    • Hud content
    • Placeholders
    • In-game editor
  • CONFIGURATIONS
    • config.yml
    • messages.yml
Powered by GitBook
On this page
  1. TUTORIALS

Creating a new hud

Create new hud by adding new section to the section "huds" inside config.yml

configuration:
  hud-refresh:
    period: 1 #IN SECONDS
  
  huds:
    example-hud: #I've just added the section for the new hud

You can create unlimited number of huds, but only one hud can be active at one time

Now choose what display method you want to use. There only 2 options: ACTIONBAR and BOSSBAR

configuration:
  hud-refresh:
    period: 1 #IN SECONDS
  
  huds:
    example-hud:
      display: ACTIONBAR
    

Actionbar is recommended, because it's responsive to the client's resolution settings

If you want, you can set permission condition for this hud. Players without this permission won't see this hud. (This is optional)

configuration:
  hud-refresh:
    period: 1 #IN SECONDS
  
  huds:
    example-hud:
      display: ACTIONBAR
      permission: "betterhud.hud.example" #This is an example, you can change the whole text 

You can also create a new toggle command for the hud. This is optional as well.

configuration:
  hud-refresh:
    period: 1 #IN SECONDS
  
  huds:
    example-hud:
      display: ACTIONBAR
      permission: "betterhud.hud.example" #This is an example, you can change the whole text
      toggle-command: "/examplehud" #This will take effect after restarting the server  

If you want to display the hud, when certain event is called, you can set toggle-actions

Available toggle actions:

on-gamemode-change-to: "SURVIVAL" #Valid values: SURVIVAL, ADVENTURE, CREATIVE, SPECTATOR
on-join: true
underwater: true
on-damage-by-entity: true
on-damage-by-player: true

Example (we want to show this hud, only when player is under water):

configuration:
  hud-refresh:
    period: 1 #IN SECONDS
  
  huds:
    example-hud:
      display: ACTIONBAR
      permission: "betterhud.hud.example" #This is an example, you can change the whole text
      toggle-command: "/examplehud" #This will take effect after restarting the server 
      toggle-actions:
        underwater: true

PreviousFirst installNextHud content

Last updated 3 years ago

Hud content