ServerInfo

API reference for ServerInfo in @erlcjs/core.

Represents the current configuration/state snapshot of an ER:LC game server.

Signature:

declare class ServerInfo extends Base

Extends: Base

#Constructors

Constructor

Modifiers

Description

(constructor)(server, data)

Creates an instance of ServerInfo.

#Properties

Property

Modifiers

Type

Description

accVerifiedReq

'Disabled' | 'Email' | 'Phone/ID'

Account verification requirements for joining.

coOwnerIds

number[]

Array of UserIds of server co-owners.

currentPlayers

number

The current number of players connected to the server.

joinKey

string

The join key of the server.

maxPlayers

number

The maximum number of players allowed in the server.

name

string

The name of the server.

ownerId

number

The UserId of the server owner.

queue

number[]

The queue of players waiting to join the server.

teamBalance

boolean

Whether team balance enforcement is enabled.

#Methods

Method

Modifiers

Description

_patch(data)

Patches the ServerInfo instance with new raw data.

compare(data)

Compares the current server data with another raw data payload to check if it's identical.

toJSON()

Converts this ServerInfo instance back to its raw JSON structure.