public interface Scoreboard
Modifier and Type | Method and Description |
---|---|
void |
clearSlot(@NotNull DisplaySlot slot)
Clears any objective in the specified slot.
|
@NotNull Set<String> |
getEntries()
Gets all entries tracked by this Scoreboard
|
@Nullable Team |
getEntryTeam(@NotNull String entry)
Gets a entries Team on this Scoreboard
|
@Nullable Objective |
getObjective(@NotNull DisplaySlot slot)
Gets the Objective currently displayed in a DisplaySlot on this
Scoreboard
|
@Nullable Objective |
getObjective(@NotNull String name)
Gets an Objective on this Scoreboard by name
|
@NotNull Set<Objective> |
getObjectives()
Gets all Objectives on this Scoreboard
|
@NotNull Set<Objective> |
getObjectivesByCriteria(@NotNull String criteria)
Gets all Objectives of a Criteria on the Scoreboard
|
@NotNull Set<OfflinePlayer> |
getPlayers()
Deprecated.
Scoreboards can contain entries that aren't players
|
@Nullable Team |
getPlayerTeam(@NotNull OfflinePlayer player)
Deprecated.
Scoreboards can contain entries that aren't players
|
@NotNull Set<Score> |
getScores(@NotNull OfflinePlayer player)
Deprecated.
Scoreboards can contain entries that aren't players
|
@NotNull Set<Score> |
getScores(@NotNull String entry)
Gets all scores for an entry on this Scoreboard
|
@Nullable Team |
getTeam(@NotNull String teamName)
Gets a Team by name on this Scoreboard
|
@NotNull Set<Team> |
getTeams()
Gets all teams on this Scoreboard
|
@NotNull Objective |
registerNewObjective(@NotNull String name,
@NotNull String criteria)
Deprecated.
a displayName should be explicitly specified
|
@NotNull Objective |
registerNewObjective(@NotNull String name,
@NotNull String criteria,
net.kyori.adventure.text.Component displayName)
Registers an Objective on this Scoreboard
|
@NotNull Objective |
registerNewObjective(@NotNull String name,
@NotNull String criteria,
net.kyori.adventure.text.Component displayName,
@NotNull RenderType renderType)
Registers an Objective on this Scoreboard
|
@NotNull Objective |
registerNewObjective(@NotNull String name,
@NotNull String criteria,
@NotNull String displayName)
Deprecated.
|
@NotNull Objective |
registerNewObjective(@NotNull String name,
@NotNull String criteria,
@NotNull String displayName,
@NotNull RenderType renderType)
Deprecated.
|
@NotNull Team |
registerNewTeam(@NotNull String name)
Registers a Team on this Scoreboard
|
void |
resetScores(@NotNull OfflinePlayer player)
Deprecated.
Scoreboards can contain entries that aren't players
|
void |
resetScores(@NotNull String entry)
Removes all scores for an entry on this Scoreboard
|
@Deprecated @NotNull @NotNull Objective registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull String criteria) throws IllegalArgumentException
name
- Name of the Objectivecriteria
- Criteria for the ObjectiveIllegalArgumentException
- if name is nullIllegalArgumentException
- if name is longer than 16
characters.IllegalArgumentException
- if criteria is nullIllegalArgumentException
- if an objective by that name already
exists@NotNull @NotNull Objective registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull String criteria, @Nullable net.kyori.adventure.text.Component displayName) throws IllegalArgumentException
name
- Name of the Objectivecriteria
- Criteria for the ObjectivedisplayName
- Name displayed to players for the Objective.IllegalArgumentException
- if name is nullIllegalArgumentException
- if name is longer than 16
characters.IllegalArgumentException
- if criteria is nullIllegalArgumentException
- if displayName is nullIllegalArgumentException
- if displayName is longer than 128
characters.IllegalArgumentException
- if an objective by that name already
exists@NotNull @NotNull Objective registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull String criteria, @Nullable net.kyori.adventure.text.Component displayName, @NotNull @NotNull RenderType renderType) throws IllegalArgumentException
name
- Name of the Objectivecriteria
- Criteria for the ObjectivedisplayName
- Name displayed to players for the Objective.renderType
- Manner of rendering the ObjectiveIllegalArgumentException
- if name is nullIllegalArgumentException
- if name is longer than 16
characters.IllegalArgumentException
- if criteria is nullIllegalArgumentException
- if displayName is nullIllegalArgumentException
- if displayName is longer than 128
characters.IllegalArgumentException
- if renderType is nullIllegalArgumentException
- if an objective by that name already
exists@NotNull @Deprecated @NotNull Objective registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull String criteria, @NotNull @NotNull String displayName) throws IllegalArgumentException
registerNewObjective(String, String, net.kyori.adventure.text.Component)
name
- Name of the Objectivecriteria
- Criteria for the ObjectivedisplayName
- Name displayed to players for the Objective.IllegalArgumentException
- if name is nullIllegalArgumentException
- if name is longer than 16
characters.IllegalArgumentException
- if criteria is nullIllegalArgumentException
- if displayName is nullIllegalArgumentException
- if displayName is longer than 128
characters.IllegalArgumentException
- if an objective by that name already
exists@NotNull @Deprecated @NotNull Objective registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull String criteria, @NotNull @NotNull String displayName, @NotNull @NotNull RenderType renderType) throws IllegalArgumentException
registerNewObjective(String, String, net.kyori.adventure.text.Component, RenderType)
name
- Name of the Objectivecriteria
- Criteria for the ObjectivedisplayName
- Name displayed to players for the Objective.renderType
- Manner of rendering the ObjectiveIllegalArgumentException
- if name is nullIllegalArgumentException
- if name is longer than 16
characters.IllegalArgumentException
- if criteria is nullIllegalArgumentException
- if displayName is nullIllegalArgumentException
- if displayName is longer than 128
characters.IllegalArgumentException
- if renderType is nullIllegalArgumentException
- if an objective by that name already
exists@Nullable @Nullable Objective getObjective(@NotNull @NotNull String name) throws IllegalArgumentException
name
- Name of the ObjectiveIllegalArgumentException
- if name is null@NotNull @NotNull Set<Objective> getObjectivesByCriteria(@NotNull @NotNull String criteria) throws IllegalArgumentException
criteria
- Criteria to search byIllegalArgumentException
- if criteria is null@NotNull @NotNull Set<Objective> getObjectives()
@Nullable @Nullable Objective getObjective(@NotNull @NotNull DisplaySlot slot) throws IllegalArgumentException
slot
- The DisplaySlotIllegalArgumentException
- if slot is null@Deprecated @NotNull @NotNull Set<Score> getScores(@NotNull @NotNull OfflinePlayer player) throws IllegalArgumentException
player
- the player whose scores are being retrievedIllegalArgumentException
- if player is nullgetScores(String)
@NotNull @NotNull Set<Score> getScores(@NotNull @NotNull String entry) throws IllegalArgumentException
entry
- the entry whose scores are being retrievedIllegalArgumentException
- if entry is null@Deprecated void resetScores(@NotNull @NotNull OfflinePlayer player) throws IllegalArgumentException
player
- the player to drop all current scores forIllegalArgumentException
- if player is nullresetScores(String)
void resetScores(@NotNull @NotNull String entry) throws IllegalArgumentException
entry
- the entry to drop all current scores forIllegalArgumentException
- if entry is null@Deprecated @Nullable @Nullable Team getPlayerTeam(@NotNull @NotNull OfflinePlayer player) throws IllegalArgumentException
player
- the player to search forIllegalArgumentException
- if player is nullgetEntryTeam(String)
@Nullable @Nullable Team getEntryTeam(@NotNull @NotNull String entry) throws IllegalArgumentException
entry
- the entry to search forIllegalArgumentException
- if entry is null@Nullable @Nullable Team getTeam(@NotNull @NotNull String teamName) throws IllegalArgumentException
teamName
- Team nameIllegalArgumentException
- if teamName is null@NotNull @NotNull Set<Team> getTeams()
@NotNull @NotNull Team registerNewTeam(@NotNull @NotNull String name) throws IllegalArgumentException
name
- Team nameIllegalArgumentException
- if name is nullIllegalArgumentException
- if team by that name already exists@Deprecated @NotNull @NotNull Set<OfflinePlayer> getPlayers()
getEntries()
@NotNull @NotNull Set<String> getEntries()
void clearSlot(@NotNull @NotNull DisplaySlot slot) throws IllegalArgumentException
slot
- the slot to remove objectivesIllegalArgumentException
- if slot is nullCopyright © 2021. All rights reserved.