Interface Scoreboard
- All Superinterfaces:
Viewable
Represents a scoreboard / an objective.
-
Method Summary
Modifier and TypeMethodDescription@Nullable Component
Gets the display name of this scoreboard ornull
if it has none.void
displayName
(@Nullable Component displayName) Sets the display name of this scoreboard.@NotNull DisplaySlot
Gets the display slot of this scoreboard.void
displaySlot
(@NotNull DisplaySlot displaySlot) Sets the display slot of this scoreboard.@NotNull String
name()
Gets the name of this scoreboard.@Nullable NumberFormat
Gets the number format of this scoreboard ornull
if it has none.void
numberFormat
(@Nullable NumberFormat numberFormat) Sets the number format of this scoreboard.void
resetScore
(@NotNull String name) Resets a score, who is specified by the name.@NotNull Score
Gets a score by its name or creates one if it does not exist.Methods inherited from interface eu.sculkpowered.server.Viewable
addViewer, removeViewer, viewers
-
Method Details
-
name
Gets the name of this scoreboard.- Returns:
- the name
- Since:
- 1.0.0
-
displayName
Gets the display name of this scoreboard ornull
if it has none.- Returns:
- the display name
- Since:
- 1.0.0
-
displayName
Sets the display name of this scoreboard.- Parameters:
displayName
- the new display name- Since:
- 1.0.0
-
numberFormat
Gets the number format of this scoreboard ornull
if it has none.- Returns:
- the number format
- Since:
- 1.0.0
-
numberFormat
Sets the number format of this scoreboard.- Parameters:
numberFormat
- the new number format- Since:
- 1.0.0
-
displaySlot
Gets the display slot of this scoreboard.- Returns:
- the display slot
- Since:
- 1.0.0
-
displaySlot
Sets the display slot of this scoreboard.- Parameters:
displaySlot
- the new display slot- Since:
- 1.0.0
-
score
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
Resets a score, who is specified by the name.- Parameters:
name
- the name of the score- Since:
- 1.0.0
-