[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / world/Scoreboard

# world/Scoreboard

## Classes

- [Scoreboard](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/Scoreboard/classes/Scoreboard.md)

## Interfaces

### Display

Defined in: [packages/prismarine/src/world/Scoreboard.ts:62](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L62)

What one display slot is showing.

#### Properties

##### objective

> `readonly` **objective**: `string`

Defined in: [packages/prismarine/src/world/Scoreboard.ts:63](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L63)

##### sortOrder

> `readonly` **sortOrder**: `"ascending"` \| `"descending"`

Defined in: [packages/prismarine/src/world/Scoreboard.ts:64](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L64)

***

### Objective

Defined in: [packages/prismarine/src/world/Scoreboard.ts:44](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L44)

One objective.

#### Properties

##### criterion

> `readonly` **criterion**: `string`

Defined in: [packages/prismarine/src/world/Scoreboard.ts:50](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L50)

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](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L52)

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](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L45)

***

### Participant

Defined in: [packages/prismarine/src/world/Scoreboard.ts:19](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L19)

One participant.

#### Properties

##### id

> `readonly` **id**: `number`

Defined in: [packages/prismarine/src/world/Scoreboard.ts:21](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L21)

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

##### live?

> `readonly` `optional` **live?**: `string`

Defined in: [packages/prismarine/src/world/Scoreboard.ts:28](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L28)

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](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L24)

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](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L26)

An entity's or a player's saved id, BDS's `EntityID` or `PlayerId`, once it is known.

##### type

> `readonly` **type**: [`ParticipantType`](#participanttype-1)

Defined in: [packages/prismarine/src/world/Scoreboard.ts:22](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L22)

***

### SavedScoreboard

Defined in: [packages/prismarine/src/world/Scoreboard.ts:68](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L68)

A scoreboard as a save holds it, in plain data.

#### Properties

##### displays

> `readonly` **displays**: readonly ([`Display`](#display) & `object`)[]

Defined in: [packages/prismarine/src/world/Scoreboard.ts:73](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L73)

##### lastId

> `readonly` **lastId**: `number`

Defined in: [packages/prismarine/src/world/Scoreboard.ts:75](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L75)

The last id given to a participant.

##### objectives

> `readonly` **objectives**: readonly ([`Objective`](#objective-1) & `object`)[]

Defined in: [packages/prismarine/src/world/Scoreboard.ts:69](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L69)

##### participants

> `readonly` **participants**: readonly [`Participant`](#participant)[]

Defined in: [packages/prismarine/src/world/Scoreboard.ts:72](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L72)

***

### ScoredEntity

Defined in: [packages/prismarine/src/world/Scoreboard.ts:35](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L35)

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](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L38)

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

##### saved?

> `readonly` `optional` **saved?**: `bigint`

Defined in: [packages/prismarine/src/world/Scoreboard.ts:40](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L40)

Its saved id, when it has one.

##### type

> `readonly` **type**: `"Entity"` \| `"Player"`

Defined in: [packages/prismarine/src/world/Scoreboard.ts:36](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L36)

## Type Aliases

### DisplaySlot

> **DisplaySlot** = *typeof* [`DISPLAY_SLOTS`](#display-slots)\[`number`\]

Defined in: [packages/prismarine/src/world/Scoreboard.ts:59](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L59)

One of [DISPLAY\_SLOTS](#display-slots).

***

### ParticipantRef

> **ParticipantRef** = \{ `name`: `string`; \} \| \{ `entity`: `string`; \} \| \{ `participant`: `number`; \}

Defined in: [packages/prismarine/src/world/Scoreboard.ts:32](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L32)

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](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L16)

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](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/Scoreboard.ts#L56)

The three slots Bedrock draws, under the names its `DisplaySlot` enum spells.
