Package org.bukkit.scoreboard
Interface Score
public interface Score
- 
Method SummaryModifier and TypeMethodDescriptionGet the custom name for this entry.voidcustomName(@Nullable Component customName) Sets the custom name for this entry.getEntry()Gets the entry being tracked by this ScoreGets the Objective being tracked by this ScoreDeprecated.Scoreboards can contain entries that aren't playersintgetScore()Gets the current scoreGets the scoreboard for the associated objective.booleanShows if this score has been set at any point in time.booleanGets if this score is triggerable and cannot be used by the/triggercommand executed by the owner of this score.Gets the number format for this score or null if the score has not been set yet or the objective's default is being used.voidnumberFormat(NumberFormat format) Sets the number format for this score.voidResets this score, if a value has been set.voidsetScore(int score) Sets the current score.voidsetTriggerable(boolean triggerable) Sets if this score is triggerable and can be used by the/triggercommand executed by the owner of this score.
- 
Method Details- 
getPlayerDeprecated.Scoreboards can contain entries that aren't playersGets the OfflinePlayer being tracked by this Score- Returns:
- this Score's tracked player
- See Also:
 
- 
getEntryGets the entry being tracked by this Score- Returns:
- this Score's tracked entry
 
- 
getObjectiveGets the Objective being tracked by this Score- Returns:
- this Score's tracked objective
 
- 
getScoreint getScore()Gets the current score- Returns:
- the current score
- Throws:
- IllegalStateException- if the associated objective has been unregistered
 
- 
setScorevoid setScore(int score) Sets the current score.- Parameters:
- score- New score
- Throws:
- IllegalStateException- if the associated objective has been unregistered
 
- 
isScoreSetboolean 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
 
- 
getScoreboardGets the scoreboard for the associated objective.- Returns:
- the owning objective's scoreboard, or null if it has been
     unregistered
 
- 
resetScoreResets this score, if a value has been set.- Throws:
- IllegalStateException- if the associated objective has been unregistered
 
- 
isTriggerableboolean isTriggerable()Gets if this score is triggerable and cannot be used by the/triggercommand executed by the owner of this score.- Returns:
- true if triggerable, false if not triggerable, score isn't set, or the objective isn't Criteria.TRIGGER
- Throws:
- IllegalStateException- if the associated objective has been unregistered
 
- 
setTriggerablevoid setTriggerable(boolean triggerable) Sets if this score is triggerable and can be used by the/triggercommand executed by the owner of this score. Can only be set onCriteria.TRIGGERobjectives.If the score doesn't exist (aka isScoreSet()returns false), this will create the score with a 0 value.- Parameters:
- triggerable- true to enable trigger, false to disable
- Throws:
- IllegalArgumentException- if this objective isn't- Criteria.TRIGGER
- IllegalStateException- if the associated objective has been unregistered
 
- 
customNameGet the custom name for this entry.- Returns:
- the custom name or null if not set (or score isn't set)
- Throws:
- IllegalStateException- if the associated objective has been unregistered
 
- 
customNameSets the custom name for this entry.If the score doesn't exist (aka isScoreSet()returns false), this will create the score with a 0 value.- Parameters:
- customName- the custom name or null to reset
- Throws:
- IllegalStateException- if the associated objective has been unregistered
 
- 
numberFormatGets the number format for this score or null if the score has not been set yet or the objective's default is being used.- Returns:
- this score's number format, or null if the objective's default is used or the score doesn't exist
- Throws:
- IllegalStateException- if the associated objective has been unregistered
 
- 
numberFormatSets the number format for this score. If this score has not been set yetisScoreSet(), it will be created- Parameters:
- format- the number format to set, pass null to reset format to default
- Throws:
- IllegalStateException- if the associated objective has been unregistered
 
 
-