Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.scoreboard.Objective Interface Reference

Public Member Functions

String getName () throws IllegalStateException
 
String getDisplayName () throws IllegalStateException
 
void setDisplayName (String displayName) throws IllegalStateException, IllegalArgumentException
 
String getCriteria () throws IllegalStateException
 
boolean isModifiable () throws IllegalStateException
 
Scoreboard getScoreboard ()
 
void unregister () throws IllegalStateException
 
void setDisplaySlot (DisplaySlot slot) throws IllegalStateException
 
DisplaySlot getDisplaySlot () throws IllegalStateException
 
Score getScore (OfflinePlayer player) throws IllegalArgumentException, IllegalStateException
 
Score getScore (String entry) throws IllegalArgumentException, IllegalStateException
 

Detailed Description

An objective on a scoreboard that can show scores specific to entries. This objective is only relevant to the display of the associated scoreboard.

Definition at line 10 of file Objective.java.

Member Function Documentation

String org.bukkit.scoreboard.Objective.getCriteria ( ) throws IllegalStateException

Gets the criteria this objective tracks.

Returns
this objective's criteria
Exceptions
IllegalStateExceptionif this objective has been unregistered
String org.bukkit.scoreboard.Objective.getDisplayName ( ) throws IllegalStateException

Gets the name displayed to players for this objective

Returns
this objective's display name
Exceptions
IllegalStateExceptionif this objective has been unregistered
DisplaySlot org.bukkit.scoreboard.Objective.getDisplaySlot ( ) throws IllegalStateException

Gets the display slot this objective is displayed at.

Returns
the display slot for this objective, or null if not displayed
Exceptions
IllegalStateExceptionif this objective has been unregistered
String org.bukkit.scoreboard.Objective.getName ( ) throws IllegalStateException

Gets the name of this Objective

Returns
this objective'ss name
Exceptions
IllegalStateExceptionif this objective has been unregistered
Score org.bukkit.scoreboard.Objective.getScore ( OfflinePlayer  player) throws IllegalArgumentException, IllegalStateException

Gets a player's Score for an Objective on this Scoreboard

Parameters
playerPlayer for the Score
Returns
Score tracking the Objective and player specified
Exceptions
IllegalArgumentExceptionif player is null
IllegalStateExceptionif this objective has been unregistered
Deprecated:
Scoreboards can contain entries that aren't players
See also
getScore(String)
Score org.bukkit.scoreboard.Objective.getScore ( String  entry) throws IllegalArgumentException, IllegalStateException

Gets an entry's Score for an Objective on this Scoreboard.

Parameters
entryEntry for the Score
Returns
Score tracking the Objective and entry specified
Exceptions
IllegalArgumentExceptionif entry is null
IllegalStateExceptionif this objective has been unregistered
Scoreboard org.bukkit.scoreboard.Objective.getScoreboard ( )

Gets the scoreboard to which this objective is attached.

Returns
Owning scoreboard, or null if it has been unregistered
boolean org.bukkit.scoreboard.Objective.isModifiable ( ) throws IllegalStateException

Gets if the objective's scores can be modified directly by a plugin.

Returns
true if scores are modifiable
Exceptions
IllegalStateExceptionif this objective has been unregistered
See also
Criterias::HEALTH
void org.bukkit.scoreboard.Objective.setDisplayName ( String  displayName) throws IllegalStateException, IllegalArgumentException

Sets the name displayed to players for this objective.

Parameters
displayNameDisplay name to set
Exceptions
IllegalStateExceptionif this objective has been unregistered
IllegalArgumentExceptionif displayName is null
IllegalArgumentExceptionif displayName is longer than 32 characters.
void org.bukkit.scoreboard.Objective.setDisplaySlot ( DisplaySlot  slot) throws IllegalStateException

Sets this objective to display on the specified slot for the scoreboard, removing it from any other display slot.

Parameters
slotdisplay slot to change, or null to not display
Exceptions
IllegalStateExceptionif this objective has been unregistered
void org.bukkit.scoreboard.Objective.unregister ( ) throws IllegalStateException

Unregisters this objective from the scoreboard.

Exceptions
IllegalStateExceptionif this objective has been unregistered

The documentation for this interface was generated from the following file: