[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/client](https://jsprismarine.dev/api/@jsprismarine/client/index.md) / Credits

# Class: Credits

Defined in: [client/src/Credits.ts:48](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/client/src/Credits.ts#L48)

The client's half of the end credits.

The server sends `ShowCredits Start` when a player first leaves the End through the exit
portal, and holds the dimension change until the client reports the credits over. A retail
client rolls the credits and answers `Finished` when they end or are skipped; this one has
no screen to roll them on, so it answers at once, which is the skip. The `ChangeDimension`
that follows the answer is `DimensionChange`'s business.

Emits `start` as the credits arrive and `finished` once the answer has been sent, each with
the server's payload.

## Extends

- `EventEmitter`

## Constructors

### Constructor

> **new Credits**(`session`, `runtimeEntityId`): `Credits`

Defined in: [client/src/Credits.ts:54](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/client/src/Credits.ts#L54)

Registers the answer on the session, for the life of the session.

#### Parameters

##### session

[`ClientSession`](https://jsprismarine.dev/api/@jsprismarine/client/classes/ClientSession.md)

The session whose `ShowCredits` this answers.

##### runtimeEntityId

() => `bigint`

Returns the runtime id `StartGame` assigned, for the answer.

#### Returns

`Credits`

#### Overrides

`EventEmitter.constructor`
