/bossbar Command in Minecraft Java Edition

Create and Customize Boss Bars on Screen

Java EditionLogic & ScoreboardPermission: Level 2

The /bossbar command lets you create and manage custom boss bars at the top of the screen in Minecraft Java Edition. You can control the bar's text, color, segmented style, maximum value, and current fill level.

Map makers and server operators use this command to display custom boss health, countdown timers, quest progress, or server announcements to specific players.

Syntax (Java 26.3, 24 forms)

  1. /bossbar add <id> <name>
  2. /bossbar get <id> max
  3. /bossbar get <id> players
  4. /bossbar get <id> value
  5. /bossbar get <id> visible
  6. /bossbar list
  7. /bossbar remove <id>
  8. /bossbar set <id> color blue
  9. /bossbar set <id> color green
  10. /bossbar set <id> color pink
  11. /bossbar set <id> color purple
  12. /bossbar set <id> color red
  13. /bossbar set <id> color white
  14. /bossbar set <id> color yellow
  15. /bossbar set <id> max <max>
  16. /bossbar set <id> name <name>
  17. /bossbar set <id> players [<targets>]
  18. /bossbar set <id> style notched_10
  19. /bossbar set <id> style notched_12
  20. /bossbar set <id> style notched_20
  21. /bossbar set <id> style notched_6
  22. /bossbar set <id> style progress
  23. /bossbar set <id> value <value>
  24. /bossbar set <id> visible <visible>

The forms you will use most

/bossbar add <id> <name>
Creates a new custom boss bar with a unique ID and display name.
/bossbar set <id> players [<targets>]
Chooses which players can see the boss bar on their screen, or hides it from everyone if no targets are given.
/bossbar set <id> value <value>
Changes the current fill amount of the boss bar.
/bossbar set <id> max <max>
Sets the maximum possible value that represents a completely full boss bar.
/bossbar set <id> visible <visible>
Toggles whether the boss bar is shown or hidden without removing the assigned players.
/bossbar get <id> value
Checks and returns the current numeric value of the specified boss bar.
/bossbar list
Displays a list of all custom boss bars that currently exist in the world.
/bossbar remove <id>
Permanently deletes a custom boss bar.

Arguments

ArgumentTypeWhat it means
<id>resource IDA namespaced resource ID used to identify the boss bar, such as <code>custom:timer</code>.
<name>text componentA JSON or SNBT text component that sets the title shown above the bar, such as <code>{"text":"Hello","color":"gold"}</code>.
<max>whole number
at least 1
A whole number of at least 1 that defines the maximum capacity of the bar.
<targets>target selector
players only
A player name, UUID, or target selector like <code>@a</code> or <code>@p</code> that selects which players see the bar.
<value>whole number
at least 0
A whole number of at least 0 that sets how much of the bar is currently filled.
<visible>true / falseA true or false setting that controls whether the bar is currently displayed on screen.

Examples

Version history

Measured from the game files of every Java release from 1.13 to 26.3.

  1. 1.13 Already in the game in 1.13, the oldest Java version we track.

Tips

Common mistakes

Java vs Bedrock

Minecraft Bedrock Edition does not have the /bossbar command.

FAQ

Why is my custom boss bar not showing up on screen?

A newly created boss bar is invisible until you assign players to it using /bossbar set players @a and make sure its visibility is set to true.

Who has permission to use the /bossbar command?

You need permission level 2, which means you must be a server operator or have cheats enabled in your single-player world.

When was the /bossbar command added to Minecraft?

The command has been available in Minecraft Java Edition since version 1.13.

Related commands

/data/execute/function/random/return/schedule/scoreboard/tag/team/trigger