Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Data shapeServer APIGenerated

PendingConnection

Defined in: server/api.d.ts:8702

A player asking to join, handed to playerConnecting. Every identifier is reported by the player’s own client and is not verified by the server.

isPending(): boolean

Defined in: server/api.d.ts:8749

Checks whether this connection is still waiting on a decision.

boolean

False once it was let in or turned away, or the player gave up and left; a queue drops such entries.


reject(reason?): void

Defined in: server/api.d.ts:8737

Turns the player away before they receive anything. Takes effect on the next server tick, whatever other handlers are still doing. Does nothing once the connection is decided or the player has left.

string

Shown to the player as written, up to 512 bytes. Omitted, they read that the server refused the connection.

void


update(message): void

Defined in: server/api.d.ts:8743

Shows the waiting player a line of status and restarts the admission timeout, so a queue that keeps updating its players is never timed out. Does nothing once the connection is decided or the player has left.

string

One line for the player’s connecting screen, up to 256 bytes: ‘Checking the whitelist’, ‘You are 4th in the queue’.

void

readonly discordId: string

Defined in: server/api.d.ts:8716

Discord identifier the client reported, or an empty string when it had none.


readonly hardwareId: string

Defined in: server/api.d.ts:8721

Framework hardware identifier the client reported, or an empty string when it had none.


readonly ip: string

Defined in: server/api.d.ts:8731

The remote address the connection comes from, without its port.


readonly nickname: string

Defined in: server/api.d.ts:8706

The name the player asked to join under.


readonly steamId: string

Defined in: server/api.d.ts:8711

Steam identifier the client reported, or an empty string when it had none.


readonly ticket: string

Defined in: server/api.d.ts:8726

The string the client was launched with, as the ticket of its launch link, or an empty string. The framework passes it through untouched; checking it – against a one-time join ticket your own launcher or website issued, typically – is the script’s job.