Skip to content

Boss Bars

Nacvark edited this page Jul 29, 2026 · 5 revisions

🌎 Choose language: EN — English · RU — Русский

Boss bars

The HUD is drawn on an invisible boss bar. That is what makes a server-side HUD possible at all: the boss bar title is the one place a server can put arbitrary content on a client's screen. It has two consequences worth understanding, and both show up the moment another plugin on the server also uses boss bars.

The colour

The pack makes one boss bar colour invisible — the one in pack.boss-bar-color, yellow by default. It replaces exactly two textures, yellow_background.png and yellow_progress.png. Every other colour is untouched.

So another plugin's boss bar in any other colour renders completely normally: its own bar, its own title, nothing lost. But a plugin that also picked yellow gets its bar blanked too, and players see its title floating with no bar behind it. The fix is one line — move ours to a colour nobody else uses:

pack:
  boss-bar-color: purple

Vanilla has seven: pink, blue, red, green, yellow, purple, white.

One detail: our bar is drawn without notches, so the notched overlay textures are left alone. A different plugin's bar in our colour with notches would still show its notches over the blanked background.

The line

The shader measures down from the top of the screen, assuming the HUD is on the first boss bar line. HUDEngine adds its bar at the lowest join priority so it usually gets there first and other plugins stack below it.

Where that does not happen — a plugin showing a bar to someone who was already online when HUDEngine started, or one that beats us to it on join — the HUD sits one line lower than it should, 19 pixels. Restarting the plugin or having the player rejoin puts it back.

If another plugin holds the top line permanently, tell the pack about it:

pack:
  boss-bar-line: 2

Count one per bar that is always above ours. Reload, then rejoin, since this changes the pack and a client only reads a new pack on connect.

The correction is exact: the HUD returns to the position its configuration asks for, rather than moving further. Another plugin's bar keeps the top line, the HUD sits under it, and neither is aware of the other:

Another plugin's boss bar above the HUD

What this does not fix

A bar that comes and goes. The offset is baked into the pack when it is built, so it cannot follow a bar that appears halfway through a fight.

Making the HUD immune to that needs the server to rewrite boss bar packets on their way out, so that other plugins' bars are folded into bars HUDEngine already owns and the number of lines never changes. That is planned rather than done, and it will arrive as an optional integration rather than as a hard dependency.

Clone this wiki locally