Package org.bukkit.scoreboard
Interface Score
public interface Score
-
Method Summary
Modifier and TypeMethodDescriptiongetEntry()
Gets the entry being tracked by this ScoreGets the Objective being tracked by this ScoreDeprecated.Scoreboards can contain entries that aren't playersint
getScore()
Gets the current scoreGets the scoreboard for the associated objective.boolean
Shows if this score has been set at any point in time.void
Resets this score, if a value has been set.void
setScore(int score)
Sets the current score.
-
Method Details
-
getPlayer
Deprecated.Scoreboards can contain entries that aren't playersGets the OfflinePlayer being tracked by this Score- Returns:
- this Score's tracked player
- See Also:
getEntry()
-
getEntry
Gets the entry being tracked by this Score- Returns:
- this Score's tracked entry
-
getObjective
Gets the Objective being tracked by this Score- Returns:
- this Score's tracked objective
-
getScore
Gets the current score- Returns:
- the current score
- Throws:
IllegalStateException
- if the associated objective has been unregistered
-
setScore
Sets the current score.- Parameters:
score
- New score- Throws:
IllegalStateException
- if the associated objective has been unregistered
-
isScoreSet
Shows if this score has been set at any point in time.- Returns:
- if this score has been set before
- Throws:
IllegalStateException
- if the associated objective has been unregistered
-
getScoreboard
Gets the scoreboard for the associated objective.- Returns:
- the owning objective's scoreboard, or null if it has been
unregistered
-
resetScore
Resets this score, if a value has been set.- Throws:
IllegalStateException
- if the associated objective has been unregistered
-