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