Skip to content

API reference / @jsprismarine/client / Credits

Class: Credits ​

Defined in: client/src/Credits.ts:48

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

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

Parameters ​

session ​

ClientSession

The session whose ShowCredits this answers.

runtimeEntityId ​

() => bigint

Returns the runtime id StartGame assigned, for the answer.

Returns ​

Credits

Overrides ​

EventEmitter.constructor