org.bukkit.scoreboard
Interface Score


public interface Score

A score entry for a player on an objective. Changing this will not affect any other objective or scoreboard.


Method Summary
 Objective getObjective()
          Gets the Objective being tracked by this Score
 OfflinePlayer getPlayer()
          Gets the OfflinePlayer being tracked by this Score
 int getScore()
          Gets the current score
 Scoreboard getScoreboard()
          Gets the scoreboard for the associated objective.
 void setScore(int score)
          Sets the current score.
 

Method Detail

getPlayer

OfflinePlayer getPlayer()
Gets the OfflinePlayer being tracked by this Score

Returns:
this Score's tracked player

getObjective

Objective getObjective()
Gets the Objective being tracked by this Score

Returns:
this Score's tracked objective

getScore

int getScore()
             throws IllegalStateException
Gets the current score

Returns:
the current score
Throws:
IllegalStateException - if the associated objective has been unregistered

setScore

void setScore(int score)
              throws IllegalStateException
Sets the current score.

Parameters:
score - New score
Throws:
IllegalStateException - if the associated objective has been unregistered

getScoreboard

Scoreboard getScoreboard()
Gets the scoreboard for the associated objective.

Returns:
the owning objective's scoreboard, or null if it has been unregistered


Copyright © 2013. All Rights Reserved.