public interface Objective
scoreboard.| Modifier and Type | Method and Description | 
|---|---|
net.kyori.adventure.text.Component | 
displayName()
Gets the name displayed to players for this objective 
 | 
void | 
displayName(net.kyori.adventure.text.Component displayName)
Sets the name displayed to players for this objective. 
 | 
@NotNull String | 
getCriteria()
Gets the criteria this objective tracks. 
 | 
@NotNull String | 
getDisplayName()
Deprecated. 
 
in favour of  
displayName() | 
@Nullable DisplaySlot | 
getDisplaySlot()
Gets the display slot this objective is displayed at. 
 | 
@NotNull String | 
getName()
Gets the name of this Objective 
 | 
@NotNull RenderType | 
getRenderType()
Sets manner in which this objective will be rendered. 
 | 
@NotNull Score | 
getScore(@NotNull OfflinePlayer player)
Deprecated. 
 
Scoreboards can contain entries that aren't players 
 | 
@NotNull Score | 
getScore(@NotNull String entry)
Gets an entry's Score for an Objective on this Scoreboard. 
 | 
@Nullable 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(@NotNull String displayName)
Deprecated. 
 
in favour of  
displayName(net.kyori.adventure.text.Component) | 
void | 
setDisplaySlot(@Nullable DisplaySlot slot)
Sets this objective to display on the specified slot for the
 scoreboard, removing it from any other display slot. 
 | 
void | 
setRenderType(@NotNull RenderType renderType)
Sets manner in which this objective will be rendered. 
 | 
void | 
unregister()
Unregisters this objective from the  
scoreboard. | 
@NotNull @NotNull String getName() throws IllegalStateException
IllegalStateException - if this objective has been unregistered@NotNull net.kyori.adventure.text.Component displayName() throws IllegalStateException
IllegalStateException - if this objective has been unregisteredvoid displayName(@Nullable net.kyori.adventure.text.Component displayName) throws IllegalStateException, IllegalArgumentException
displayName - Display name to setIllegalStateException - if this objective has been unregisteredIllegalArgumentException - if displayName is nullIllegalArgumentException - if displayName is longer than 128
     characters.@NotNull @Deprecated @NotNull String getDisplayName() throws IllegalStateException
displayName()IllegalStateException - if this objective has been unregistered@Deprecated void setDisplayName(@NotNull @NotNull String displayName) throws IllegalStateException, IllegalArgumentException
displayName(net.kyori.adventure.text.Component)displayName - Display name to setIllegalStateException - if this objective has been unregisteredIllegalArgumentException - if displayName is nullIllegalArgumentException - if displayName is longer than 128
     characters.@NotNull @NotNull String getCriteria() throws IllegalStateException
IllegalStateException - if this objective has been unregisteredboolean isModifiable()
              throws IllegalStateException
IllegalStateException - if this objective has been unregisteredCriterias.HEALTH@Nullable @Nullable Scoreboard getScoreboard()
unregisteredvoid unregister()
         throws IllegalStateException
scoreboard.IllegalStateException - if this objective has been unregisteredvoid setDisplaySlot(@Nullable @Nullable DisplaySlot slot) throws IllegalStateException
slot - display slot to change, or null to not displayIllegalStateException - if this objective has been unregistered@Nullable @Nullable DisplaySlot getDisplaySlot() throws IllegalStateException
IllegalStateException - if this objective has been unregisteredvoid setRenderType(@NotNull @NotNull RenderType renderType) throws IllegalStateException
renderType - new render typeIllegalStateException - if this objective has been unregistered@NotNull @NotNull RenderType getRenderType() throws IllegalStateException
IllegalStateException - if this objective has been unregistered@Deprecated @NotNull @NotNull Score getScore(@NotNull @NotNull OfflinePlayer player) throws IllegalArgumentException, IllegalStateException
player - Player for the ScoreIllegalArgumentException - if player is nullIllegalStateException - if this objective has been unregisteredgetScore(String)@NotNull @NotNull Score getScore(@NotNull @NotNull String entry) throws IllegalArgumentException, IllegalStateException
entry - Entry for the ScoreIllegalArgumentException - if entry is nullIllegalStateException - if this objective has been unregisteredIllegalArgumentException - if entry is longer than 40 characters.Copyright © 2022. All rights reserved.