Create a timer bar
/bossbar add blockaria:timer "Time left"Creates a bar named Time left. Nobody sees it yet.

/bossbar creates a bar at the top of the screen, like the one of a boss fight, and sets its name, color, style, value and players. Map makers use it for timers, progress bars, capture points and boss fights built with commands.
/bossbar add <id> <name>/bossbar get <id> (max|players|value|visible)/bossbar list/bossbar remove <id>/bossbar set <id> (color|max|name|players|style|value|visible)/bossbar add/bossbar add <id> <name>| Argument | Expects | What it does |
|---|---|---|
| id | Resource ID | Unique ID of the bar, such as blockaria:timer. Without a namespace, minecraft: is added. |
| name | JSON text | JSON text shown above the bar, for example "Time left" or {"text":"Boss","color":"red"}. |
/bossbar get/bossbar get <id> (max|players|value|visible)| Argument | Expects | What it does |
|---|---|---|
| id | Resource ID | Unique ID of the bar, such as blockaria:timer. Without a namespace, minecraft: is added. |
/bossbar list/bossbar list/bossbar remove/bossbar remove <id>| Argument | Expects | What it does |
|---|---|---|
| id | Resource ID | Unique ID of the bar, such as blockaria:timer. Without a namespace, minecraft: is added. |
/bossbar set/bossbar set <id> (color|max|name|players|style|value|visible)| Argument | Expects | What it does |
|---|---|---|
| id | Resource ID | Unique ID of the bar, such as blockaria:timer. Without a namespace, minecraft: is added. |
| max | Whole numberat least 1 | Highest value of the bar, 1 or more. A new bar uses 100. |
| name | JSON text | JSON text shown above the bar, for example "Time left" or {"text":"Boss","color":"red"}. |
| targetsoptional | Player selectorone or several | Players who see the bar, like @a. Leave it out to remove every player from the bar. |
| value | Whole numberat least 0 | Current filling, from 0 up to the maximum. Often copied from a score with /execute store. |
| visible | true / false | true shows the bar to its players, false hides it without deleting it. |
/bossbar add blockaria:timer "Time left"Creates a bar named Time left. Nobody sees it yet.
/bossbar set blockaria:timer players @aEvery online player now sees the bar at the top of the screen.
/bossbar set blockaria:timer max 300With one point per second, the full bar now stands for five minutes.
/bossbar set blockaria:timer value 120The bar is filled to 120 out of 300, so 40 percent.
/bossbar set blockaria:timer color redA red bar signals that time is running out.
/bossbar set blockaria:timer style notched_10The notched_10 style divides the bar into 10 segments, easier to read at a glance.
/bossbar get blockaria:timer valueShows the value in chat and returns it to /execute store.
/bossbar remove blockaria:timerDeletes the bar for every player.
Fill in the fields, then copy the command.
Command generatorA new bar stays invisible until you assign players. The usual order is bossbar add blockaria:timer "Time left", then bossbar set blockaria:timer players @a. A new bar starts at a value of 0 out of 100, in white, with the progress style. Change max and value to fill it, and color or style for the look, like the bars of the Wither or the Ender Dragon. Custom bars are saved with the world and come back after a restart.
A bar does not update by itself. Copy a score into it with /execute: execute store result bossbar blockaria:timer value run scoreboard players get Timer countdown. Run this every tick from a /function or a Repeating Command Block, and the bar follows the /scoreboard value. bossbar get returns the value, maximum, player count or visibility, which you can store too.
A bossbar already exists with the ID: choose another ID or remove the old bar.No bossbar exists with the ID: check the namespace, timer means minecraft:timer.set players again with a selector that includes them.✓ Checked in Java Edition 26.3 · updated 2 November 2026
A bar only shows to the players you assign. Run /bossbar set blockaria:timer players @a, with your own ID, and check that visible is set to true.
Run /bossbar remove followed by its ID, for example /bossbar remove blockaria:timer. /bossbar list shows the IDs of all custom bars.
Type it in the chat with cheats on: /bossbar add <id> <name>.
Cheats on, or operator level 2.