Interface Score


public interface Score
Represents a scoreboard score.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Component
    Gets the display name of the score or null if the score has none.
    @NotNull String
    Gets the name of the score.
    @Nullable NumberFormat
    Gets the number format of the score or null if the score has none.
    int
    Gets the score value of the score.
    default void
    set(int score)
    Sets the score value of the score.
    default void
    set(int score, @Nullable Component displayName)
    Sets the score value and display name of the score.
    void
    set(int score, @Nullable Component displayName, @Nullable NumberFormat numberFormat)
    Sets the score attributes.
  • Method Details

    • name

      @NotNull @NotNull String name()
      Gets the name of the score.
      Returns:
      the name
      Since:
      1.0.0
    • score

      int score()
      Gets the score value of the score.
      Returns:
      the score value
      Since:
      1.0.0
    • displayName

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

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

      default void set(int score)
      Sets the score value of the score.
      Parameters:
      score - the new score value
      Since:
      1.0.0
    • set

      default void set(int score, @Nullable @Nullable Component displayName)
      Sets the score value and display name of the score.
      Parameters:
      score - the new score value
      displayName - the new display name
      Since:
      1.0.0
    • set

      void set(int score, @Nullable @Nullable Component displayName, @Nullable @Nullable NumberFormat numberFormat)
      Sets the score attributes.
      Parameters:
      score - the new score value
      displayName - the new display name
      numberFormat - the new number format
      Since:
      1.0.0