Player

API reference for Player in @erlcjs/core.

Represents a player in the ER:LC server.

Signature:

declare class Player extends Base

Extends: Base

#Constructors

Constructor

Modifiers

Description

(constructor)(server, data)

Creates an instance of Player.

#Properties

Property

Modifiers

Type

Description

callsign?

string

(Optional) The player's callsign, if assigned.

commandLogs

readonly

CommandLog[]

Gets all command logs associated with this player.

deaths

readonly

KillLog[]

Gets all kill logs where this player is the killed.

id

number

The unique UserId of the player.

kills

readonly

KillLog[]

Gets all kill logs where this player is the killer.

location

{ x: number; z: number; postalCode: string; streetName: string; buildingNumber: string; }

The current location coordinates and address of the player.

permission

'Normal' | 'Server Administrator' | 'Server Owner' | 'Server Moderator'

The player's server permission role.

team

string

The in-game team name the player is currently on.

username

string

The Roblox username of the player.

vehicles

readonly

Vehicle[]

Gets all vehicles owned by this player.

wantedLevel

number

The player's current wanted star level.

#Methods

Method

Modifiers

Description

_patch(data)

Patches/updates the player structure with new raw data.

admin()

Admins the player in-game.

ban(reason)

Bans the player from the game server.

heal()

Heals the player in the game server.

helper()

Helpers the player in-game.

jail()

Jails the player in the game server.

kick(reason)

Kicks the player from the game server.

kill()

Kills the player in-game.

load()

Loads the player in-game.

message(text)

Sends a private message to the player.

mod()

Mods the player in-game.

pm(text)

Sends a private message to the player.

refresh()

Refresh the player in-game.

respawn()

Respawns the player in-game.

toJSON()

Converts this Player instance back into raw data structure.

tp(player)

Teleports the player to another player.

unadmin()

Unadmins the player in-game.

unhelper()

Unhelpers the player in-game.

unmod()

Unmods the player in-game.

wanted()

Makes the player wanted in-game.