Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
Score.java
1 package org.bukkit.scoreboard;
2 
4 
5 /**
6  * A score entry for an {@link #getEntry() entry} on an {@link
7  * #getObjective() objective}. Changing this will not affect any other
8  * objective or scoreboard.
9  */
10 public interface Score {
11 
12  /**
13  * Gets the OfflinePlayer being tracked by this Score
14  *
15  * @return this Score's tracked player
16  * @deprecated Scoreboards can contain entries that aren't players
17  * @see #getEntry()
18  */
19  @Deprecated
21 
22  /**
23  * Gets the entry being tracked by this Score
24  *
25  * @return this Score's tracked entry
26  */
27  String getEntry();
28 
29  /**
30  * Gets the Objective being tracked by this Score
31  *
32  * @return this Score's tracked objective
33  */
35 
36  /**
37  * Gets the current score
38  *
39  * @return the current score
40  * @throws IllegalStateException if the associated objective has been
41  * unregistered
42  */
43  int getScore() throws IllegalStateException;
44 
45  /**
46  * Sets the current score.
47  *
48  * @param score New score
49  * @throws IllegalStateException if the associated objective has been
50  * unregistered
51  */
52  void setScore(int score) throws IllegalStateException;
53 
54  /**
55  * Gets the scoreboard for the associated objective.
56  *
57  * @return the owning objective's scoreboard, or null if it has been
58  * {@link Objective#unregister() unregistered}
59  */
61 }
void setScore(int score)
OfflinePlayer getPlayer()