接口 Score
public interface Score
-
方法详细资料
-
getPlayer
已过时。计分板可包含非玩家项目获取此分数为哪个玩家而记.原文:Gets the OfflinePlayer being tracked by this Score
- 返回:
- 分数对应的玩家
- 另请参阅:
-
getEntry
获取此分数为哪个项目而记.原文:Gets the entry being tracked by this Score
- 返回:
- 分数对应的项目
-
getObjective
获取此分数记录所属的计分项.原文:Gets the Objective being tracked by this Score
- 返回:
- 所属计分项
-
getScore
int getScore()获取当前分数.原文:Gets the current score
- 返回:
- 分数
- 抛出:
IllegalStateException
- 若相关的计分项已被注销
-
setScore
void setScore(int score) 设置当前分数.原文:Sets the current score.
- 参数:
score
- 分数- 抛出:
IllegalStateException
- 若相关的计分项已被注销
-
isScoreSet
boolean isScoreSet()判断是否曾设置过分数数据.原文:Shows if this score has been set at any point in time.
- 返回:
- 是否曾设置过分数数据
- 抛出:
IllegalStateException
- 若相关的计分项已被注销
-
getScoreboard
获取相关计分项所属的计分板.原文:Gets the scoreboard for the associated objective.
- 返回:
- 相关计分项所属的计分板, 如果计分项已被
注销
则为 null
-