Interface BossBarRender


public interface BossBarRender
Renders boss bar displays to players with automatic cleanup.

Usage example:

BossBarRender bossBarRender = flectonePulse.get(BossBarRender.class);

BossBar bossBar = new BossBar(
    0.5f, // 50% health
    Color.BLUE,
    Overlay.PROGRESS,
    Set.of(Flag.DARKEN_SKY),
    100 // 5 seconds
);

bossBarRender.render(player, Component.text("Boss Fight!"), bossBar);
Since:
1.7.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    render(FPlayer fPlayer, net.kyori.adventure.text.Component component, BossBar bossBar)
    Renders a boss bar to a player with automatic removal.
  • Method Details

    • render

      void render(FPlayer fPlayer, net.kyori.adventure.text.Component component, BossBar bossBar)
      Renders a boss bar to a player with automatic removal.
      Parameters:
      fPlayer - the player to receive the boss bar
      component - the title component to display
      bossBar - the boss bar configuration