Checked for versions: Java Edition 1.15–26.3 (/schedule … replace and /schedule clear need 1.15; everything else works from 1.13). Data pack folder names below are for 1.21 and newer.
Pick the channel by how long the information matters
| Channel | How long it stays | Good for | Poor for |
|---|---|---|---|
Chat (tellraw) | Until it scrolls away; stays in chat history | Rules, instructions, exact wording | Anything players must watch while moving |
| Title and subtitle | About 5 seconds with the default timing (0.5 s in, 3.5 s on screen, 1 s out) | The start or end of an event, one heavy moment | Information needed later |
| Action bar | A few seconds above the hotbar | Personal feedback: "Quest updated", "Not enough tokens" | State the whole server shares |
| Bossbar | Until you hide or remove it | Timers, progress, phases, a boss's health | Messages and dialogue |
A well-run event usually uses several at once: a title when it starts, one chat line that says what the bar measures, the bar itself for the duration, and a title or chat line at the end. For the message side, see readable server announcements.
Four bossbar patterns that work on RP servers
Countdown
"Evacuation window", "The ritual completes in…". The bar starts full and drains. Use the progress style and a yellow or red color. The full recipe is below.
Charge
The bar fills as players act: offerings brought, generators repaired, votes cast. max is the goal, and the value comes from a scoreboard your event already counts:
execute store result bossbar cube:ritual_charge value run scoreboard players get #offerings ritual
Phases
A raid in four stages: max 4, and value is the current stage. Choose a notched style that divides evenly by the number of stages (notched_12 for 4 or 6 stages, notched_10 for 5), so phase boundaries land on notches.
Boss health
For a custom boss summoned with a tag, copy its health into the bar every tick or every second. Set max to the boss's maximum health (300 here); the stored value is the health rounded down:
bossbar set cube:event_boss max 300
execute store result bossbar cube:event_boss value run data get entity @e[tag=event_boss,limit=1] Health
The selector must find exactly one entity. If the boss is dead or unloaded the second line fails and the bar keeps its last value, so remove the bar when the fight ends. Different groups can see different bars: give each one its own selector, such as players @a[team=defenders].
Rules that keep event UI readable
- One bar for one piece of state. If players need to follow two things, use two bars, and rarely more than two at once.
- A short title. The title sits in small text above the bar. "Evacuation" or "Ritual 65%" reads faster than a sentence.
- Colors that mean the same thing every time. For example red for danger, yellow for timers, purple for magic. Players learn the code after an event or two.
- Explain it once. The first time a bar appears, say in chat what it measures and what happens when it fills or empties.
- End it. Remove the bar when the event is over. Custom bars are saved with the world, so yesterday's raid bar is still there after a restart.
A working countdown
A bossbar does not count by itself. You keep the remaining time in a scoreboard, lower it on a schedule and copy it into the bar. The one thing to get right is the unit: a repeating command block runs every game tick, 20 times per second, so a loop that subtracts 1 per run counts ticks, not seconds. A "60 second" timer set to 60 would be over in three seconds.
With command blocks (counting ticks)
Setup, run once from chat or an impulse block. 60 seconds are 1200 ticks:
/scoreboard objectives add event_timer dummy
/scoreboard players set #timer event_timer 1200
/bossbar add cube:evacuation {"text":"Evacuation","color":"yellow"}
/bossbar set cube:evacuation color yellow
/bossbar set cube:evacuation max 1200
/bossbar set cube:evacuation value 1200
/bossbar set cube:evacuation players @a
The loop is one repeating command block followed by four chain blocks, all set to Always Active, in this order (command blocks accept the commands with or without a leading slash):
execute if score #timer event_timer matches 1.. run scoreboard players remove #timer event_timer 1
execute if score #timer event_timer matches 0.. store result bossbar cube:evacuation value run scoreboard players get #timer event_timer
execute if score #timer event_timer matches 0 run say The evacuation window is closed.
execute if score #timer event_timer matches 0 run bossbar remove cube:evacuation
execute if score #timer event_timer matches 0 run scoreboard players set #timer event_timer -1
The first block only subtracts while time is left. The second copies the time into the bar. At zero the last three blocks run your event command, remove the bar and park the timer at -1, so nothing repeats on the following ticks. Running the setup again restarts the countdown.
With a data pack (counting seconds)
In a data pack you can skip per-tick work entirely: a function reschedules itself once per second. Three files in the namespace cube (before 1.21 the folder is functions, not function):
data/cube/function/evacuation/start.mcfunction
scoreboard objectives add event_timer dummy
scoreboard players set #timer event_timer 60
bossbar add cube:evacuation {"text":"Evacuation","color":"yellow"}
bossbar set cube:evacuation color yellow
bossbar set cube:evacuation max 60
bossbar set cube:evacuation value 60
bossbar set cube:evacuation players @a
schedule function cube:evacuation/second 1s replace
data/cube/function/evacuation/second.mcfunction
scoreboard players remove #timer event_timer 1
execute store result bossbar cube:evacuation value run scoreboard players get #timer event_timer
bossbar set cube:evacuation players @a
execute if score #timer event_timer matches 1.. run schedule function cube:evacuation/second 1s replace
execute if score #timer event_timer matches ..0 run function cube:evacuation/finish
data/cube/function/evacuation/finish.mcfunction
bossbar remove cube:evacuation
say The evacuation window is closed.
Start it with /function cube:evacuation/start. The players line in second adds anyone who logged in during the countdown. Nothing runs between the seconds, and /schedule clear cube:evacuation/second stops the countdown early (remove the bar afterwards).
Common mistakes
- The bar is invisible.
playersnever ran, or ran before anyone was online. - The timer ends 20 times too fast. The loop counts ticks while
maxand the score were set in seconds. - The setup fails the second time.
bossbar addstops at an existing ID. Remove the old bar first, or skip the add line. - Yesterday's bar is still on screen. Remove bars at the end of every event and check
/bossbar list. - The bar carries text. If a message has to be read rather than watched, it belongs in chat or a title.
FAQ
Can every player have a personal timer?
Not with one bar: its value is the same for everyone who sees it. For personal timers use the action bar or a per-player score.
Ticks or seconds?
Seconds with /schedule when a one-second step is precise enough. Ticks with a repeating block or a tick function when the bar should drain perfectly smoothly.
Can the title show the remaining seconds?
Not on its own. The name is fixed when bossbar set … name runs, so you would have to set it again every second. Most events read fine with a short title and the bar itself.
Does it work on Bedrock?
No. /bossbar and /schedule are Java Edition commands.