Klasse Sidebar

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

public final class Sidebar extends Object
A flicker-free sidebar scoreboard shared by all players of a round.

Each line is backed by a fixed, invisible entry whose text is supplied by a team prefix, so updating a line only changes the prefix and never re-registers the entry (which would flicker). The same Scoreboard is shown to every viewer.

  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Sidebar(@NotNull net.kyori.adventure.text.Component title)
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    hideFrom(@NotNull Player player)
    Restores the scoreboard the player had before the sidebar was shown, falling back to the server's main scoreboard.
    void
    setLines(@NotNull List<net.kyori.adventure.text.Component> lines)
    Replaces the sidebar lines, top to bottom.
    void
    showTo(@NotNull Player player)
    Shows this sidebar to a player, remembering their previous scoreboard (for example one owned by a tab-list or stats plugin) so it can be restored afterwards.

    Von Klasse geerbte Methoden java.lang.Object

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

    • Sidebar

      public Sidebar(@NotNull @NotNull net.kyori.adventure.text.Component title)
      Parameter:
      title - the sidebar title
  • Methodendetails

    • setLines

      public void setLines(@NotNull @NotNull List<net.kyori.adventure.text.Component> lines)
      Replaces the sidebar lines, top to bottom.
      Parameter:
      lines - the line components
    • showTo

      public void showTo(@NotNull @NotNull Player player)
      Shows this sidebar to a player, remembering their previous scoreboard (for example one owned by a tab-list or stats plugin) so it can be restored afterwards.
      Parameter:
      player - the player
    • hideFrom

      public void hideFrom(@NotNull @NotNull Player player)
      Restores the scoreboard the player had before the sidebar was shown, falling back to the server's main scoreboard.
      Parameter:
      player - the player