Interface Sidebar

public interface Sidebar
  • Method Details

    • addLine

      void addLine(SidebarLine sidebarLine)
      Add a new line to the scoreboard.
      sidebarLine - content.
    • setLine

      void setLine(SidebarLine sidebarLine, int line)
      Set a line content. Ignored if not exists. It will send the update to players automatically.
      sidebarLine - content.
      line - position. 0 bottom.
    • setTitle

      void setTitle(SidebarLine title)
      Set scoreboard title. It will send the update to players automatically.
      title - content.
    • refreshPlaceholders

      void refreshPlaceholders()
      Refresh scoreboard placeholders. Can be used async.
    • refreshTitle

      void refreshTitle()
      Refresh scoreboard title. Useful when you have an animated title. Can be used async.
    • remove

      void remove(org.bukkit.entity.Player player)
      It is very important to call this when a player logs out or before deleting a scoreboard.
      player - uuid.
    • add

      void add(org.bukkit.entity.Player player)
      Apply scoreboard to a player.
      player - user.
    • refreshAnimatedLines

      void refreshAnimatedLines()
      Refresh animated lines. Title excluded. Can be used async.
    • removeLine

      void removeLine(int line)
      Remove a line from the scoreboard. Ignored if line does not exist. Line 0 is the first from bottom. It will send the update to players automatically.
      line - position. 0 is bottom.
    • clearLines

      void clearLines()
    • lineCount

      int lineCount()
      lines amount.
    • getPlaceholders

      List<PlaceholderProvider> getPlaceholders()
      Get placeholder providers list.
      placeholder providers list.
    • setPlayerHealth

      void setPlayerHealth(org.bukkit.entity.Player player, int health)
      Update player health if shown with showPlayersHealth(SidebarLine, boolean).
      player - subject.
      health - amount.
    • hidePlayersHealth

      void hidePlayersHealth()
      Hide players health previously shown with showPlayersHealth(SidebarLine, boolean).
    • showPlayersHealth

      void showPlayersHealth(SidebarLine displayName, boolean list)
      Show players name.
      displayName - text under player name.
      list - show health scale on tab.
    • playerTabCreate

      PlayerTab playerTabCreate(String identifier, @Nullable @Nullable org.bukkit.entity.Player player, SidebarLine prefix, SidebarLine suffix, PlayerTab.PushingRule pushingRule)
      Create a new tab list layout group. Players added to this group will have the same prefix-suffix.
      identifier - group identifier.
      player - initial member.
      prefix - prefix text or animation.
      suffix - suffix text or animation.
      pushingRule - how to manage pushing.
      tab group instance.
    • removeTab

      void removeTab(String identifier)
      Remove tab group form tab list by identifier.
      identifier - name.
    • playerTabRefreshAnimation

      void playerTabRefreshAnimation()
      Refresh tab-list animations (if making use of SidebarLineAnimated).
    • playerHealthRefreshAnimation

      void playerHealthRefreshAnimation()
      Refresh bellow player-name animations (if making use of SidebarLineAnimated) and if health is displayed via showPlayersHealth(SidebarLine, boolean).
    • addPlaceholder

      void addPlaceholder(PlaceholderProvider placeholderProvider)
      Add a new placeholder provider for sidebar lines.
      placeholderProvider - placeholder.
    • removePlaceholder

      void removePlaceholder(String placeholder)
      Remove a placeholder.
      placeholder - placeholder to be removed.