Interface Score
public interface Score
Represents a scoreboard score.
-
Method Summary
Modifier and TypeMethodDescription@Nullable Component
Gets the display name of the score ornull
if the score has none.@NotNull String
name()
Gets the name of the score.@Nullable NumberFormat
Gets the number format of the score ornull
if the score has none.int
score()
Gets the score value of the score.default void
set
(int score) Sets the score value of the score.default void
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
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
Gets the display name of the score ornull
if the score has none.- Returns:
- the display name
- Since:
- 1.0.0
-
numberFormat
Gets the number format of the score ornull
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
Sets the score value and display name of the score.- Parameters:
score
- the new score valuedisplayName
- 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 valuedisplayName
- the new display namenumberFormat
- the new number format- Since:
- 1.0.0
-