public interface Objective
scoreboard
.Modifier and Type | Method | Description |
---|---|---|
String |
getCriteria() |
Gets the criteria this objective tracks.
|
String |
getDisplayName() |
Gets the name displayed to players for this objective
|
DisplaySlot |
getDisplaySlot() |
Gets the display slot this objective is displayed at.
|
String |
getName() |
Gets the name of this Objective
|
Score |
getScore(String entry) |
Gets an entry's Score for an Objective on this Scoreboard.
|
Score |
getScore(OfflinePlayer player) |
Deprecated.
Scoreboards can contain entries that aren't players
|
Scoreboard |
getScoreboard() |
Gets the scoreboard to which this objective is attached.
|
boolean |
isModifiable() |
Gets if the objective's scores can be modified directly by a plugin.
|
void |
setDisplayName(String displayName) |
Sets the name displayed to players for this objective.
|
void |
setDisplaySlot(DisplaySlot slot) |
Sets this objective to display on the specified slot for the
scoreboard, removing it from any other display slot.
|
void |
unregister() |
Unregisters this objective from the
scoreboard. |
String getName() throws IllegalStateException
IllegalStateException
- if this objective has been unregisteredString getDisplayName() throws IllegalStateException
IllegalStateException
- if this objective has been unregisteredvoid setDisplayName(String displayName) throws IllegalStateException, IllegalArgumentException
displayName
- Display name to setIllegalStateException
- if this objective has been unregisteredIllegalArgumentException
- if displayName is nullIllegalArgumentException
- if displayName is longer than 32
characters.String getCriteria() throws IllegalStateException
IllegalStateException
- if this objective has been unregisteredboolean isModifiable() throws IllegalStateException
IllegalStateException
- if this objective has been unregisteredCriterias.HEALTH
Scoreboard getScoreboard()
unregistered
void unregister() throws IllegalStateException
scoreboard.
IllegalStateException
- if this objective has been unregisteredvoid setDisplaySlot(DisplaySlot slot) throws IllegalStateException
slot
- display slot to change, or null to not displayIllegalStateException
- if this objective has been unregisteredDisplaySlot getDisplaySlot() throws IllegalStateException
IllegalStateException
- if this objective has been unregistered@Deprecated Score getScore(OfflinePlayer player) throws IllegalArgumentException, IllegalStateException
player
- Player for the ScoreIllegalArgumentException
- if player is nullIllegalStateException
- if this objective has been unregisteredgetScore(String)
Score getScore(String entry) throws IllegalArgumentException, IllegalStateException
entry
- Entry for the ScoreIllegalArgumentException
- if entry is nullIllegalStateException
- if this objective has been unregisteredCopyright © 2019. All rights reserved.