Package org.spongepowered.api.scoreboard
Interface Score
public interface Score
A score entry for one or more
Objective
s.-
Method Summary
Modifier and TypeMethodDescriptiondisplay()
Returns this score displayboolean
isLocked()
Checks for whether the score is locked.name()
Gets the name of this score.Returns the score number formatint
score()
Gets the current score value.void
setDisplay
(@Nullable Component display) Sets this score displayvoid
setLocked
(boolean locked) Sets this score as locked.void
setNumberFormat
(@Nullable ScoreFormat format) Sets the score number formatvoid
setScore
(int score) Sets the current score value.
-
Method Details
-
name
String name()Gets the name of this score.- Returns:
- The name of this score
-
score
int score()Gets the current score value.- Returns:
- The current score value
-
setScore
void setScore(int score) Sets the current score value.- Parameters:
score
- The new score value
-
isLocked
boolean isLocked()Checks for whether the score is locked.- Returns:
- True if the score is locked, false otherwise
-
setLocked
void setLocked(boolean locked) Sets this score as locked.- Parameters:
locked
- True to lock this score
-
setDisplay
Sets this score display- Parameters:
display
- the display
-
display
Returns this score display- Returns:
- the display
-
setNumberFormat
Sets the score number format- Parameters:
format
- the number format
-
numberFormat
Optional<ScoreFormat> numberFormat()Returns the score number format- Returns:
- the number format
-
objectives
-