Interface Scoreboard

All Superinterfaces:
Viewable

public interface Scoreboard extends Viewable
Represents a scoreboard / an objective.
  • Method Details

    • name

      @NotNull @NotNull String name()
      Gets the name of this scoreboard.
      Returns:
      the name
      Since:
      1.0.0
    • displayName

      @Nullable @Nullable Component displayName()
      Gets the display name of this scoreboard or null if it has none.
      Returns:
      the display name
      Since:
      1.0.0
    • displayName

      void displayName(@Nullable @Nullable Component displayName)
      Sets the display name of this scoreboard.
      Parameters:
      displayName - the new display name
      Since:
      1.0.0
    • numberFormat

      @Nullable @Nullable NumberFormat numberFormat()
      Gets the number format of this scoreboard or null if it has none.
      Returns:
      the number format
      Since:
      1.0.0
    • numberFormat

      void numberFormat(@Nullable @Nullable NumberFormat numberFormat)
      Sets the number format of this scoreboard.
      Parameters:
      numberFormat - the new number format
      Since:
      1.0.0
    • displaySlot

      @NotNull @NotNull DisplaySlot displaySlot()
      Gets the display slot of this scoreboard.
      Returns:
      the display slot
      Since:
      1.0.0
    • displaySlot

      void displaySlot(@NotNull @NotNull DisplaySlot displaySlot)
      Sets the display slot of this scoreboard.
      Parameters:
      displaySlot - the new display slot
      Since:
      1.0.0
    • score

      @NotNull @NotNull Score score(@NotNull @NotNull String name)
      Gets a score by its name or creates one if it does not exist.
      Parameters:
      name - the name of the score
      Returns:
      the score of the name
      Since:
      1.0.0
    • resetScore

      void resetScore(@NotNull @NotNull String name)
      Resets a score, who is specified by the name.
      Parameters:
      name - the name of the score
      Since:
      1.0.0