Minecraft Boss Bars

PaperMC provides a simple foundation for extending Minecraft server-side with small plugins, without requiring clients to install anything. When developing plugins, the question arises of how to display dynamic information to the player. The answer lies in an often overlooked vanilla feature: the boss bar . Originally intended for end bosses, the boss bar can be repurposed and used as a minimalist HUD.


Instead of explaining numbers, you can work with brief statuses that convey only a feeling. This often has a stronger effect than another scoreboard or chat messages. The Bossbar API is surprisingly powerful: color, style, and progress can be changed dynamically. Unlike scoreboards, the Bossbar remains discreetly at the top of the screen.

BossBar bar = Bukkit.createBossBar("", BarColor.BLUE, BarStyle.SOLID);
bar.addPlayer(player);

Example 1: Temperature display: The Celsius value is normalized to the range 0–1, and the color is chosen accordingly: blue for cold, green for pleasant, and red for hot.:

bar.setTitle(String.format("🌡 %.0f°C", celsius));
bar.setProgress((celsius + 20) / 60.0);
bar.setColor(celsius < 10 ? BarColor.BLUE : celsius < 30 ? BarColor.GREEN : BarColor.RED);

Example 2: Oxygen underwater: Segmented display is perfectly suited for discrete values such as breaths. SEGMENTED_10 You have ten visible units:

bar.setTitle("💨 Sauerstoff");
bar.setStyle(BarStyle.SEGMENTED_10);
bar.setProgress(player.getRemainingAir() / 300.0);

Example 3: Pulsating fear bar: A sine wave causes progress to fluctuate rhythmically. In a BukkitRunnable This creates a lively effect.:

double pulse = 0.5 + 0.5 * Math.sin(phase);
bar.setProgress(fearLevel * pulse);
bar.setTitle(fearLevel > 0.7 ? "💀 GEFAHR" : "👁 Unruhe");

You can stack up to five boss bars simultaneously, enabling complex HUD systems. To make a bar almost invisible, you set the progress to... 0.0001 – The title remains visible, but the progress bar disappears. The boss bar is therefore an underrated tool for atmospheric game mechanics. Especially in horror or survival setups, it can be used to suggest situations without ever revealing hard numbers to the player.

To implement such mechanics efficiently, I recommend using my small boilerplate , which defines the plugin structure. In addition to the Gradle configuration, the repository also contains build scripts for local and production environments, as well as examples of custom weapons and resource packs. This allows you to quickly try out new HUD ideas because you don't have to deal with packaging, server setup, and deployment details every time.

Back