public interface Objective
该对象仅显示关联项目.scoreboard
.
原文:An objective on a scoreboard that can show scores specific to entries. This
objective is only relevant to the display of the associated scoreboard
.
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getCriteria()
获取对象规则.
|
java.lang.String |
getDisplayName()
获取对象内用于显示的名称.
|
DisplaySlot |
getDisplaySlot()
获取对象显示的计分板位置区域.
|
java.lang.String |
getName()
获取对象名称.
|
Score |
getScore(OfflinePlayer player)
已过时。
计分板可以包含非玩家项
|
Score |
getScore(java.lang.String entry)
获取一个对象的计分项目的积分.
|
Scoreboard |
getScoreboard()
获取对象所链接的计分板.
|
boolean |
isModifiable()
获取布尔值:对象分数是否可以被插件直接修改.
|
void |
setDisplayName(java.lang.String displayName)
设置对象内用于显示的名称.
|
void |
setDisplaySlot(DisplaySlot slot)
设置对象显示的计分板位置区域.
|
void |
unregister()
注销对象
scoreboard. . |
java.lang.String getName() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- 对象已被注销java.lang.String getDisplayName() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- 对象已被注销void setDisplayName(java.lang.String displayName) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
displayName
- 用于显示的名称java.lang.IllegalStateException
- 对象已被注销java.lang.IllegalArgumentException
- 参数displayName(显示名称)为空java.lang.IllegalArgumentException
- 参数displayName(显示名称)大于32个字符
characters.java.lang.String getCriteria() throws java.lang.IllegalStateException
原文:Gets the criteria this objective tracks.
java.lang.IllegalStateException
- 对象已被注销boolean isModifiable() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- 对象已被注销Criterias.HEALTH
Scoreboard getScoreboard()
unregistered
void unregister() throws java.lang.IllegalStateException
scoreboard.
.
java.lang.IllegalStateException
- 对象已被注销void setDisplaySlot(DisplaySlot slot) throws java.lang.IllegalStateException
原文:Sets this objective to display on the specified slot for the scoreboard, removing it from any other display slot.
slot
- 显示的位置区域(null不显示)java.lang.IllegalStateException
- 对象已被注销DisplaySlot getDisplaySlot() throws java.lang.IllegalStateException
Gets the display slot this objective is displayed at.
java.lang.IllegalStateException
- 对象已被注销@Deprecated Score getScore(OfflinePlayer player) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
原文:Gets a player's Score for an Objective on this Scoreboard
player
- 玩家IDjava.lang.IllegalArgumentException
- 参数player(玩家ID)为空java.lang.IllegalStateException
- if this 对象已被注销getScore(String)
Score getScore(java.lang.String entry) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
原文:Gets an entry's Score for an Objective on this Scoreboard.
entry
- 计分项目java.lang.IllegalArgumentException
- 参数entry(项目)为空java.lang.IllegalStateException
- 对象已被注销