Interface Scoreboard

All Superinterfaces:
Audience, ForwardingAudience, PacketGroupingAudience, Pointered, Viewable
All Known Implementing Classes:
BelowNameTag, Sidebar, TabList

public interface Scoreboard extends Viewable, PacketGroupingAudience
This interface represents all scoreboard of Minecraft.
  • Method Details

    • getCreationObjectivePacket

      @NotNull default @NotNull ScoreboardObjectivePacket getCreationObjectivePacket(Component value, ScoreboardObjectivePacket.Type type)
      Creates a creation objective packet.
      Parameters:
      value - The value for the objective
      type - The type for the objective
      Returns:
      the creation objective packet
    • getDestructionObjectivePacket

      @NotNull default @NotNull ScoreboardObjectivePacket getDestructionObjectivePacket()
      Creates the destruction objective packet.
      Returns:
      the destruction objective packet
    • getDisplayScoreboardPacket

      @NotNull default @NotNull DisplayScoreboardPacket getDisplayScoreboardPacket(byte position)
      Parameters:
      position - The position of the scoreboard
      Returns:
      the created display scoreboard packet
    • updateScore

      default void updateScore(Player player, int score)
      Updates the score of a Player.
      Parameters:
      player - The player
      score - The new score
    • getObjectiveName

      @NotNull @NotNull String getObjectiveName()
      Gets the objective name of the scoreboard.
      Returns:
      the objective name
    • getPlayers

      @NotNull default @NotNull Collection<Player> getPlayers()
      Description copied from interface: PacketGroupingAudience
      Gets an iterable of the players this audience contains.
      Specified by:
      getPlayers in interface PacketGroupingAudience
      Returns:
      the connections