HyperScript
Docs

← All of the Docs What players see

Boss bars

effectcreate bossbar [<id>]

The id names the bar so it can be updated or removed later; without one the id is default

create bossbar titled "&r&lEvent Boss" with color red with progress 100 for all players
Try it
expressiontitled <text>

The text on the bar

create bossbar titled "&r&lEvent Boss" with color red with progress 100 for all players
Try it
effectwith color <colour>

pink, blue, red, green, yellow, purple or white (the default)

create bossbar titled "&r&lEvent Boss" with color red with progress 100 for all players
Try it
effectwith progress <0-100>

How full the bar is, in percent; the default is 100

create bossbar titled "&r&lEvent Boss" with color red with progress 100 for all players
Try it
effectwith segments <n>since 1.7.3

Notches along the bar: 6, 10, 12 or 20. Any other number gives a plain bar

create bossbar "lives" titled "&cLives" with color red with segments 10 with progress 70 for player
Try it
structurefor <who>

Who sees it

create bossbar titled "&r&lEvent Boss" with color red with progress 100 for all players
Try it
structurefor <n> seconds

Optional: remove the bar after this long

create bossbar "raid" titled "&cRaid: %{_left}% left" with progress {_left} / 8 * 100 for player for 30 seconds
Try it
structurefor <n> seconds counting downsince 1.7.59

The bar empties by itself as the time runs, and is removed at the end

command /round:
    trigger:
        create bossbar "round" titled "&cRound ends" for all players for 30 seconds counting down
Try it
effectremove bossbar [<id>]

Remove the bar for everyone

remove bossbar "raid"
Try it
Guide and examples
create bossbar titled "&r&lEvent Boss" with color red with progress 100 for all players
create bossbar "raid" titled "&cRaid: %{_left}% left" with progress {_left} / 8 * 100 for player for 30 seconds
remove bossbar "raid"
PartMeaning
create bossbar [<id>]The id names the bar so it can be updated or removed later; without one the id is default
titled <text>The text on the bar
with color <colour>pink, blue, red, green, yellow, purple or white (the default)
with progress <0-100>How full the bar is, in percent; the default is 100
with segments <n>Notches along the bar: 6, 10, 12 or 20. Any other number gives a plain bar
for <who>Who sees it
for <n> secondsOptional: remove the bar after this long
for <n> seconds counting downThe bar empties by itself as the time runs, and is removed at the end
remove bossbar [<id>]Remove the bar for everyone
  • Creating a bar whose id already exists updates it (title, colour, progress) and adds the new viewers, so a countdown is just the same create bossbar line run again with a new progress.
  • A bar shown to all players is also shown to players who join later.
  • Bars are removed when the plugin is disabled; they do not survive a restart.