public interface Objective
scoreboard
.Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getCriteria() |
Gets the criteria this objective tracks.
|
java.lang.String |
getDisplayName() |
Gets the name displayed to players for this objective
|
DisplaySlot |
getDisplaySlot() |
Gets the display slot this objective is displayed at.
|
java.lang.String |
getName() |
Gets the name of this Objective
|
Score |
getScore(java.lang.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(java.lang.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. |
java.lang.String getName() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if this objective has been unregisteredjava.lang.String getDisplayName() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if this objective has been unregisteredvoid setDisplayName(java.lang.String displayName) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
displayName
- Display name to setjava.lang.IllegalStateException
- if this objective has been unregisteredjava.lang.IllegalArgumentException
- if displayName is nulljava.lang.IllegalArgumentException
- if displayName is longer than 128
characters.java.lang.String getCriteria() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if this objective has been unregisteredboolean isModifiable() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if this objective has been unregisteredCriterias.HEALTH
Scoreboard getScoreboard()
unregistered
void unregister() throws java.lang.IllegalStateException
scoreboard.
java.lang.IllegalStateException
- if this objective has been unregisteredvoid setDisplaySlot(DisplaySlot slot) throws java.lang.IllegalStateException
slot
- display slot to change, or null to not displayjava.lang.IllegalStateException
- if this objective has been unregisteredDisplaySlot getDisplaySlot() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if this objective has been unregistered@Deprecated Score getScore(OfflinePlayer player) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
player
- Player for the Scorejava.lang.IllegalArgumentException
- if player is nulljava.lang.IllegalStateException
- if this objective has been unregisteredgetScore(String)
Score getScore(java.lang.String entry) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
entry
- Entry for the Scorejava.lang.IllegalArgumentException
- if entry is nulljava.lang.IllegalStateException
- if this objective has been unregisteredCopyright © 2018. All rights reserved.