Interface Score
public interface Score
Represents a scoreboard score.
-
Method Summary
Modifier and TypeMethodDescription@Nullable ComponentGets the display name of the score ornullif the score has none.@NotNull Stringname()Gets the name of the score.@Nullable NumberFormatGets the number format of the score ornullif the score has none.intscore()Gets the score value of the score.default voidset(int score) Sets the score value of the score.default voidSets the score value and display name of the score.voidset(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 ornullif the score has none.- Returns:
- the display name
- Since:
- 1.0.0
-
numberFormat
Gets the number format of the score ornullif 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
-