Bossbar Command Generator

Create an on-screen boss bar — use it as a health bar, timer, or progress bar (Java only)

If you don't include a namespace, the system will add minecraft: automatically.

The correct order of operations

  1. First create the bar with add, e.g. the ID minecraft:timer
  2. Run set players to @a — otherwise no one will see the bar.
  3. Set max to the maximum value, then use set value to adjust the bar length during play.

If you want the bar to count down automatically, tie it to Scoreboard then run execute store result bossbar minecraft:timer value run scoreboard players get ...

/bossbar exists only on Java Edition — Bedrock has no such command (on Bedrock you need an add-on or Title/actionbar instead).

Worked examples

The examples below come out of the same generator as the form above, so the commands and explanations always match what the tool produces. Copy one and adjust it from there

1. Create a boss bar to use as a timer

A boss bar does not have to belong to a boss — it is commonly repurposed as a timer or a quest progress bar

/bossbar add minecraft:timer {"text":"เหลือเวลาอีก"}

What it does Will create a new bossbar named "minecraft:timer" showing the text "เหลือเวลาอีก". A freshly created bar has no players attached yet — use players to add them first.

2. Choose who can see the bar

A newly created bar is invisible until you assign players to it — this step is easy to forget

/bossbar set minecraft:timer players @a

What it does Will let all players see the bossbar "minecraft:timer".

3. Update the bar’s current value

Run this repeatedly from a command block to walk the bar downward for a countdown effect

/bossbar set minecraft:timer value 50

What it does Will set the current value of the bossbar "minecraft:timer" to 50 — the bar's length is the current value divided by the maximum.

How this command differs by edition and version

This is the first example above, run through every edition and version this tool supports. Versions that produce the same result share a row

Every version this tool supports produces the same result, so a command you copy works without version-specific edits

Java Edition 1.21.5 and up Java Edition 1.20.5 - 1.21.4 Java Edition 1.13 - 1.20.4 (legacy NBT)
/bossbar add minecraft:timer {"text":"เหลือเวลาอีก"}

Before you use these