Bossbar

A bossbar is a bar that can track a boss mob's health or the total health of raid mobs.

Manual creation
A bossbar could be shown using the command.

Boss mobs
A bossbar appears in the top center of the screen when near to a boss mob.

For the ender dragon's bossbar to appear, the player must be within a Euclidean distance of 192 blocks from the coordinates (0.0, 192, 0.0) in the End dimension.

Raids
When a player is within a certain radius of the center of a raid, a raid bossbar appears, showing the total health of all raid mobs present during the current wave.

Color
The bossbar has colors depending on which boss mob or event is active.

The ender dragon has a color of pink. The wither has a dark purple or pink bossbar. The raid bossbar has a color of red.

ID system
A bossbar has an ID, which can be used to do certain actions with one bossbar. An ID is not shown on the creation of the bossbar, so you can't see it.

Removing
A bossbar can be disabled by using.