Skip to content

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 ​

readonly objective: string

Defined in: packages/prismarine/src/world/Scoreboard.ts:63

sortOrder ​

readonly sortOrder: "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 ​

readonly criterion: 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 ​

readonly displayName: string

Defined in: packages/prismarine/src/world/Scoreboard.ts:52

What the client draws, which defaults to the objective's own name.

name ​

readonly name: string

Defined in: packages/prismarine/src/world/Scoreboard.ts:45


Participant ​

Defined in: packages/prismarine/src/world/Scoreboard.ts:19

One participant.

Properties ​

id ​

readonly id: number

Defined in: packages/prismarine/src/world/Scoreboard.ts:21

The id the scoreboard gave it, BDS's ScoreboardId.

live? ​

readonly optional live?: 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 ​

readonly name: 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? ​

readonly optional saved?: 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 ​

readonly type: 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 ​

readonly displays: readonly (Display & object)[]

Defined in: packages/prismarine/src/world/Scoreboard.ts:73

lastId ​

readonly lastId: number

Defined in: packages/prismarine/src/world/Scoreboard.ts:75

The last id given to a participant.

objectives ​

readonly objectives: readonly (Objective & object)[]

Defined in: packages/prismarine/src/world/Scoreboard.ts:69

participants ​

readonly participants: readonly Participant[]

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 ​

readonly name: string

Defined in: packages/prismarine/src/world/Scoreboard.ts:38

A player's name, or the entity's runtime id.

saved? ​

readonly optional saved?: bigint

Defined in: packages/prismarine/src/world/Scoreboard.ts:40

Its saved id, when it has one.

type ​

readonly type: "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 ​

const DISPLAY_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.