org.bukkit.scoreboard
Interface Scoreboard


public interface Scoreboard

A scoreboard


Method Summary
 void clearSlot(DisplaySlot slot)
          Clears any objective in the specified slot.
 Objective getObjective(DisplaySlot slot)
          Gets the Objective currently displayed in a DisplaySlot on this Scoreboard
 Objective getObjective(String name)
          Gets an Objective on this Scoreboard by name
 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()
          Gets all players tracked by this Scoreboard
 Team getPlayerTeam(OfflinePlayer player)
          Gets a player's Team on this Scoreboard
 Set<Score> getScores(OfflinePlayer player)
          Gets all scores for a player on this Scoreboard
 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)
          Registers an Objective on this Scoreboard
 Team registerNewTeam(String name)
          Registers a Team on this Scoreboard
 void resetScores(OfflinePlayer player)
          Removes all scores for a player on this Scoreboard
 

Method Detail

registerNewObjective

Objective registerNewObjective(String name,
                               String criteria)
                               throws IllegalArgumentException
Registers an Objective on this Scoreboard

Parameters:
name - Name of the Objective
criteria - Criteria for the Objective
Returns:
The registered Objective
Throws:
IllegalArgumentException - if name is null
IllegalArgumentException - if criteria is null
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

Set<Score> getScores(OfflinePlayer player)
                     throws IllegalArgumentException
Gets 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

resetScores

void resetScores(OfflinePlayer player)
                 throws IllegalArgumentException
Removes all scores for a player on this Scoreboard

Parameters:
player - the player to drop all current scores
Throws:
IllegalArgumentException - if player is null

getPlayerTeam

Team getPlayerTeam(OfflinePlayer player)
                   throws IllegalArgumentException
Gets 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

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

getTeams

Set<Team> getTeams()
Gets all teams on this Scoreboard

Returns:
an immutable set of Teams

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 null
IllegalArgumentException - if team by that name already exists

getPlayers

Set<OfflinePlayer> getPlayers()
Gets all players tracked by this Scoreboard

Returns:
immutable set of all tracked players

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


Copyright © 2013. All Rights Reserved.