API reference / @jsprismarine/prismarine / world/Scoreboard
world/Scoreboard
Classes
Interfaces
Display
Defined in: packages/prismarine/src/world/Scoreboard.ts:62
What one display slot is showing.
Properties
objective
readonlyobjective:string
Defined in: packages/prismarine/src/world/Scoreboard.ts:63
sortOrder
readonlysortOrder:"ascending"|"descending"
Defined in: packages/prismarine/src/world/Scoreboard.ts:64
Objective
Defined in: packages/prismarine/src/world/Scoreboard.ts:44
One objective.
Properties
criterion
readonlycriterion:string
Defined in: packages/prismarine/src/world/Scoreboard.ts:50
What raises its scores, by the full name Java stores, such as dummy or minecraft.custom:minecraft.play_time; see @jsprismarine/commands/criteria.
displayName
readonlydisplayName:string
Defined in: packages/prismarine/src/world/Scoreboard.ts:52
What the client draws, which defaults to the objective's own name.
name
readonlyname:string
Defined in: packages/prismarine/src/world/Scoreboard.ts:45
Participant
Defined in: packages/prismarine/src/world/Scoreboard.ts:19
One participant.
Properties
id
readonlyid:number
Defined in: packages/prismarine/src/world/Scoreboard.ts:21
The id the scoreboard gave it, BDS's ScoreboardId.
live?
readonlyoptionallive?:string
Defined in: packages/prismarine/src/world/Scoreboard.ts:28
The runtime id of the entity or player while it is in the world, which scripts know it by.
name
readonlyname:string
Defined in: packages/prismarine/src/world/Scoreboard.ts:24
A fake player's name, a player's name or an entity's id: what a script reads as displayName.
saved?
readonlyoptionalsaved?:bigint
Defined in: packages/prismarine/src/world/Scoreboard.ts:26
An entity's or a player's saved id, BDS's EntityID or PlayerId, once it is known.
type
readonlytype:ParticipantType
Defined in: packages/prismarine/src/world/Scoreboard.ts:22
SavedScoreboard
Defined in: packages/prismarine/src/world/Scoreboard.ts:68
A scoreboard as a save holds it, in plain data.
Properties
displays
readonlydisplays: readonly (Display&object)[]
Defined in: packages/prismarine/src/world/Scoreboard.ts:73
lastId
readonlylastId:number
Defined in: packages/prismarine/src/world/Scoreboard.ts:75
The last id given to a participant.
objectives
readonlyobjectives: readonly (Objective&object)[]
Defined in: packages/prismarine/src/world/Scoreboard.ts:69
participants
readonlyparticipants: readonlyParticipant[]
Defined in: packages/prismarine/src/world/Scoreboard.ts:72
ScoredEntity
Defined in: packages/prismarine/src/world/Scoreboard.ts:35
What the scoreboard knows of a live entity it is asked to score.
Properties
name
readonlyname:string
Defined in: packages/prismarine/src/world/Scoreboard.ts:38
A player's name, or the entity's runtime id.
saved?
readonlyoptionalsaved?:bigint
Defined in: packages/prismarine/src/world/Scoreboard.ts:40
Its saved id, when it has one.
type
readonlytype:"Entity"|"Player"
Defined in: packages/prismarine/src/world/Scoreboard.ts:36
Type Aliases
DisplaySlot
DisplaySlot = typeof
DISPLAY_SLOTS[number]
Defined in: packages/prismarine/src/world/Scoreboard.ts:59
One of DISPLAY_SLOTS.
ParticipantRef
ParticipantRef = {
name:string; } | {entity:string; } | {participant:number; }
Defined in: packages/prismarine/src/world/Scoreboard.ts:32
Who a call names: a fake player by name, an entity by runtime id, or a participant by its id.
ParticipantType
ParticipantType =
"Entity"|"FakePlayer"|"Player"
Defined in: packages/prismarine/src/world/Scoreboard.ts:16
How a participant is known, as BDS's IdentityType and the Script API's ScoreboardIdentityType name it.
Variables
DISPLAY_SLOTS
constDISPLAY_SLOTS: readonly ["list","sidebar","belowname"]
Defined in: packages/prismarine/src/world/Scoreboard.ts:56
The three slots Bedrock draws, under the names its DisplaySlot enum spells.