Package cn.nukkit.scoreboard.scoreboard
Class ScoreboardLine
java.lang.Object
cn.nukkit.scoreboard.scoreboard.ScoreboardLine
- All Implemented Interfaces:
IScoreboardLine
@PowerNukkitXOnly
@Since("1.19.30-r1")
public class ScoreboardLine
extends Object
implements IScoreboardLine
-
Field Summary
Modifier and TypeFieldDescriptionprotected final long
protected int
protected final IScoreboard
protected final IScorer
protected static long
-
Constructor Summary
ConstructorDescriptionScoreboardLine
(IScoreboard scoreboard, IScorer scorer) ScoreboardLine
(IScoreboard scoreboard, IScorer scorer, int score) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cn.nukkit.scoreboard.scoreboard.IScoreboardLine
addScore, removeScore, toNetworkInfo, updateScore
-
Field Details
-
staticLineId
protected static long staticLineId -
scoreboard
-
scorer
-
lineId
protected final long lineId -
score
protected int score
-
-
Constructor Details
-
ScoreboardLine
-
ScoreboardLine
-
-
Method Details
-
setScore
public boolean setScore(int score) Description copied from interface:IScoreboardLine
设置分数- Specified by:
setScore
in interfaceIScoreboardLine
- Parameters:
score
- 分数- Returns:
- 是否成功(事件被撤回就会false)
-
getScoreboard
Description copied from interface:IScoreboardLine
获取此计分行所属的计分板- Specified by:
getScoreboard
in interfaceIScoreboardLine
- Returns:
- 所属计分板
-
getScorer
Description copied from interface:IScoreboardLine
获取追踪对象- Specified by:
getScorer
in interfaceIScoreboardLine
- Returns:
- 追踪对象
-
getLineId
public long getLineId()Description copied from interface:IScoreboardLine
获取行id 客户端通过此id标识计分板上的每个行- Specified by:
getLineId
in interfaceIScoreboardLine
- Returns:
- 行id
-
getScore
public int getScore()Description copied from interface:IScoreboardLine
获取分数- Specified by:
getScore
in interfaceIScoreboardLine
- Returns:
- 分数
-