Package org.bukkit.scoreboard
Interface Scoreboard
-
public interface ScoreboardA scoreboard
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidclearSlot(DisplaySlot slot)Clears any objective in the specified slot.Set<String>getEntries()Gets all entries tracked by this ScoreboardTeamgetEntryTeam(String entry)Gets a entries Team on this ScoreboardObjectivegetObjective(String name)Gets an Objective on this Scoreboard by nameObjectivegetObjective(DisplaySlot slot)Gets the Objective currently displayed in a DisplaySlot on this ScoreboardSet<Objective>getObjectives()Gets all Objectives on this ScoreboardSet<Objective>getObjectivesByCriteria(String criteria)Gets all Objectives of a Criteria on the ScoreboardSet<OfflinePlayer>getPlayers()Deprecated.Scoreboards can contain entries that aren't playersTeamgetPlayerTeam(OfflinePlayer player)Deprecated.Scoreboards can contain entries that aren't playersSet<Score>getScores(String entry)Gets all scores for an entry on this ScoreboardSet<Score>getScores(OfflinePlayer player)Deprecated.Scoreboards can contain entries that aren't playersTeamgetTeam(String teamName)Gets a Team by name on this ScoreboardSet<Team>getTeams()Gets all teams on this ScoreboardObjectiveregisterNewObjective(String name, String criteria)Deprecated.a displayName should be explicitly specifiedObjectiveregisterNewObjective(String name, String criteria, String displayName)Registers an Objective on this ScoreboardTeamregisterNewTeam(String name)Registers a Team on this ScoreboardvoidresetScores(String entry)Removes all scores for an entry on this ScoreboardvoidresetScores(OfflinePlayer player)Deprecated.Scoreboards can contain entries that aren't players
-
-
-
Method Detail
-
registerNewObjective
@Deprecated Objective registerNewObjective(String name, String criteria) throws IllegalArgumentException
Deprecated.a displayName should be explicitly specifiedRegisters an Objective on this Scoreboard- Parameters:
name- Name of the Objectivecriteria- Criteria for the Objective- Returns:
- The registered Objective
- Throws:
IllegalArgumentException- if name is nullIllegalArgumentException- if name is longer than 16 characters.IllegalArgumentException- if criteria is nullIllegalArgumentException- if an objective by that name already exists
-
registerNewObjective
Objective registerNewObjective(String name, String criteria, String displayName) throws IllegalArgumentException
Registers an Objective on this Scoreboard- Parameters:
name- Name of the Objectivecriteria- Criteria for the ObjectivedisplayName- Name displayed to players for the Objective.- Returns:
- The registered Objective
- Throws:
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
-
getObjective
Objective getObjective(String name) throws IllegalArgumentException
Gets an Objective on this Scoreboard by name- Parameters:
name- Name of the Objective- Returns:
- the Objective or null if it does not exist
- Throws:
IllegalArgumentException- if name is null
-
getObjectivesByCriteria
Set<Objective> getObjectivesByCriteria(String criteria) throws IllegalArgumentException
Gets all Objectives of a Criteria on the Scoreboard- Parameters:
criteria- Criteria to search by- Returns:
- an immutable set of Objectives using the specified Criteria
- Throws:
IllegalArgumentException
-
getObjectives
Set<Objective> getObjectives()
Gets all Objectives on this Scoreboard- Returns:
- An immutable set of all Objectives on this Scoreboard
-
getObjective
Objective getObjective(DisplaySlot slot) throws IllegalArgumentException
Gets the Objective currently displayed in a DisplaySlot on this Scoreboard- Parameters:
slot- The DisplaySlot- Returns:
- the Objective currently displayed or null if nothing is displayed in that DisplaySlot
- Throws:
IllegalArgumentException- if slot is null
-
getScores
@Deprecated Set<Score> getScores(OfflinePlayer player) throws IllegalArgumentException
Deprecated.Scoreboards can contain entries that aren't playersGets all scores for a player on this Scoreboard- Parameters:
player- the player whose scores are being retrieved- Returns:
- immutable set of all scores tracked for the player
- Throws:
IllegalArgumentException- if player is null- See Also:
getScores(String)
-
getScores
Set<Score> getScores(String entry) throws IllegalArgumentException
Gets all scores for an entry on this Scoreboard- Parameters:
entry- the entry whose scores are being retrieved- Returns:
- immutable set of all scores tracked for the entry
- Throws:
IllegalArgumentException- if entry is null
-
resetScores
@Deprecated void resetScores(OfflinePlayer player) throws IllegalArgumentException
Deprecated.Scoreboards can contain entries that aren't playersRemoves all scores for a player on this Scoreboard- Parameters:
player- the player to drop all current scores for- Throws:
IllegalArgumentException- if player is null- See Also:
resetScores(String)
-
resetScores
void resetScores(String entry) throws IllegalArgumentException
Removes all scores for an entry on this Scoreboard- Parameters:
entry- the entry to drop all current scores for- Throws:
IllegalArgumentException- if entry is null
-
getPlayerTeam
@Deprecated Team getPlayerTeam(OfflinePlayer player) throws IllegalArgumentException
Deprecated.Scoreboards can contain entries that aren't playersGets a player's Team on this Scoreboard- Parameters:
player- the player to search for- Returns:
- the player's Team or null if the player is not on a team
- Throws:
IllegalArgumentException- if player is null- See Also:
getEntryTeam(String)
-
getEntryTeam
Team getEntryTeam(String entry) throws IllegalArgumentException
Gets a entries Team on this Scoreboard- Parameters:
entry- the entry to search for- Returns:
- the entries Team or null if the entry is not on a team
- Throws:
IllegalArgumentException- if entry is null
-
getTeam
Team getTeam(String teamName) throws IllegalArgumentException
Gets a Team by name on this Scoreboard- Parameters:
teamName- Team name- Returns:
- the matching Team or null if no matches
- Throws:
IllegalArgumentException- if teamName is null
-
registerNewTeam
Team registerNewTeam(String name) throws IllegalArgumentException
Registers a Team on this Scoreboard- Parameters:
name- Team name- Returns:
- registered Team
- Throws:
IllegalArgumentException- if name is nullIllegalArgumentException- if team by that name already exists
-
getPlayers
@Deprecated Set<OfflinePlayer> getPlayers()
Deprecated.Scoreboards can contain entries that aren't playersGets all players tracked by this Scoreboard- Returns:
- immutable set of all tracked players
- See Also:
getEntries()
-
getEntries
Set<String> getEntries()
Gets all entries tracked by this Scoreboard- Returns:
- immutable set of all tracked entries
-
clearSlot
void clearSlot(DisplaySlot slot) throws IllegalArgumentException
Clears any objective in the specified slot.- Parameters:
slot- the slot to remove objectives- Throws:
IllegalArgumentException- if slot is null
-
-