Components, intro and commands
Components
A piece you reuse, with parameters, so the shape of a stat is written once:
components:
stat: "<#C879FF>❙ <white>{label}"
value: "<#5B3A6E> <white>{value}<#5B3A6E> {unit=}"
profiles:
default:
sidebar:
lines:
- "<use:stat:label=Kills>"
- "<use:value:value=%df_kills%>"
- "<use:stat:label=Money>"
- "<use:value:value=%hud_balance%:unit=coins>"
{name} is a parameter, {name=default} a parameter with a default. Parameters are split on
:, so a value with a colon in it (a condition, a <shine> tag) belongs inside the component.
Components can use other components.
Intro
How the sidebar comes in when a player joins:
sidebar:
intro:
effect: reveal # the lines appear one after another
duration-ms: 900 # over this long
delay-ticks: 10 # after waiting this long (20 ticks = 1 s)
Leave the section out and the sidebar shows at once. The intro plays once per join, never on a world change.
Showing things from a command
Other plugins, scripts and admins can put something on a player's screen without touching the
config. All of these need hudforge.admin and work from the console, where * means everyone.
| Command | What it does |
|---|---|
/hud open <profile> [player\|*] [seconds] |
Forces a profile onto a player, for the seconds given or until /hud close. An event screen, a countdown board, a tutorial. |
/hud close [player\|*] |
Back to the automatic choice. |
/hud bar <player\|*> <seconds> [color=RED] <text> |
A boss bar whose fill runs down with the time left. |
/hud actionbar <player\|*> <seconds> <text> |
A line in the action bar for that long. |
/hud images |
The pictures found in images/ and their glyph settings. |
What a player can hide
/hud toggle <sidebar|tablist|bossbar|actionbar|all> hides that part for that player and
remembers it in players.yml across reconnections; the same command brings it back. /hud
hide is the short form of toggle all. Both need hudforge.hide, which everyone has by
default. The name tags and the TAB order others see are never affected.