Klasse ArenaHud

java.lang.Object
de.delinkedde.mobarenareborn.hud.ArenaHud

public final class ArenaHud extends Object
The in-round heads-up display: a shared boss bar plus per-wave titles.

During a wave the boss bar is red and shows the wave number and the number of mobs left, with the bar filling as mobs are defeated. During the safe phase it turns green and counts down to the next wave. A title announces each new wave.

One instance exists per running session. Players are added as boss-bar viewers with show(Player) and removed with hide(Player).

  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    hide(@NotNull Player player)
    Removes the boss bar and sidebar from a player.
    void
    intermission(int secondsRemaining, int totalSeconds, int nextWave, int playersAlive)
    Updates the boss bar to reflect the safe-phase countdown.
    void
    setKillLines(List<String> killLines)
    Sets the per-player kill lines appended to the sidebar (MiniMessage, best killer first).
    void
    show(@NotNull Player player)
    Adds a player as a viewer of the boss bar and sidebar.
    void
    wave(int wave, int mobsRemaining, int waveTotal, int playersAlive)
     
    void
    waveTitle(@NotNull Collection<? extends Player> players, int wave)
    Shows the wave-start title to the given players.

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • ArenaHud

      public ArenaHud()
  • Methodendetails

    • show

      public void show(@NotNull @NotNull Player player)
      Adds a player as a viewer of the boss bar and sidebar.
      Parameter:
      player - the player
    • hide

      public void hide(@NotNull @NotNull Player player)
      Removes the boss bar and sidebar from a player.
      Parameter:
      player - the player
    • setKillLines

      public void setKillLines(@NotNull List<String> killLines)
      Sets the per-player kill lines appended to the sidebar (MiniMessage, best killer first).
      Parameter:
      killLines - the formatted lines
    • wave

      public void wave(int wave, int mobsRemaining, int waveTotal, int playersAlive)
    • intermission

      public void intermission(int secondsRemaining, int totalSeconds, int nextWave, int playersAlive)
      Updates the boss bar to reflect the safe-phase countdown.
      Parameter:
      secondsRemaining - seconds left until the next wave
      totalSeconds - the full length of the safe phase
      nextWave - the upcoming wave number
      playersAlive - the number of players currently in the round
    • waveTitle

      public void waveTitle(@NotNull @NotNull Collection<? extends Player> players, int wave)
      Shows the wave-start title to the given players.
      Parameter:
      players - the players to show the title to
      wave - the wave number