Class TabList

java.lang.Object
net.minestom.server.scoreboard.TabList
All Implemented Interfaces:
Audience, ForwardingAudience, Pointered, PacketGroupingAudience, Scoreboard, Viewable

public class TabList extends Object implements Scoreboard
Represents the Player tab list as a Scoreboard.
  • Constructor Details

  • Method Details

    • getType

      Gets the scoreboard objective type
      Returns:
      the scoreboard objective type
    • setType

      public void setType(ScoreboardObjectivePacket.Type type)
      Changes the scoreboard objective type
      Parameters:
      type - The new type for the objective
    • addViewer

      public boolean addViewer(@NotNull @NotNull Player player)
      Description copied from interface: Viewable
      Adds a viewer.
      Specified by:
      addViewer in interface Viewable
      Parameters:
      player - the viewer to add
      Returns:
      true if the player has been added, false otherwise (could be because he is already a viewer)
    • removeViewer

      public boolean removeViewer(@NotNull @NotNull Player player)
      Description copied from interface: Viewable
      Removes a viewer.
      Specified by:
      removeViewer in interface Viewable
      Parameters:
      player - the viewer to remove
      Returns:
      true if the player has been removed, false otherwise (could be because he was not a viewer)
    • getViewers

      @NotNull public @NotNull Set<Player> getViewers()
      Description copied from interface: Viewable
      Gets all the viewers of this viewable element.
      Specified by:
      getViewers in interface Viewable
      Returns:
      A Set containing all the element's viewers
    • getObjectiveName

      public String getObjectiveName()
      Description copied from interface: Scoreboard
      Gets the objective name of the scoreboard.
      Specified by:
      getObjectiveName in interface Scoreboard
      Returns:
      the objective name