跳转至

ScoreboardObjective

文档版本:1.21.0.24

ScoreboardObjective类。script_api.minecraft/server.scoreboardobjective.description

属性

displayName
read-only displayName: string;
id
read-only id: string;

方法

addScore

script_api.minecraft/server.scoreboardobjective.addscore.description

addScore(participant: Entity | ScoreboardIdentity | string, scoreToAdd: int32): int32
getParticipants

script_api.minecraft/server.scoreboardobjective.getparticipants.description

getParticipants(): ScoreboardIdentity[]
getScore

script_api.minecraft/server.scoreboardobjective.getscore.description

getScore(participant: Entity | ScoreboardIdentity | string): int32 | undefined
getScores

script_api.minecraft/server.scoreboardobjective.getscores.description

getScores(): ScoreboardScoreInfo[]
hasParticipant

script_api.minecraft/server.scoreboardobjective.hasparticipant.description

hasParticipant(participant: Entity | ScoreboardIdentity | string): boolean
isValid

script_api.minecraft/server.scoreboardobjective.isvalid.description

isValid(): boolean
removeParticipant

script_api.minecraft/server.scoreboardobjective.removeparticipant.description

removeParticipant(participant: Entity | ScoreboardIdentity | string): boolean
setScore

script_api.minecraft/server.scoreboardobjective.setscore.description

setScore(participant: Entity | ScoreboardIdentity | string, score: int32): void