CommandLog

API reference for CommandLog in @erlcjs/core.

Represents a logged command execution event.

Signature:

declare class CommandLog extends Base

Extends: Base

#Constructors

Constructor

Modifiers

Description

(constructor)(server, data)

Creates an instance of CommandLog.

#Properties

Property

Modifiers

Type

Description

command

string

The full command string executed.

player?

Player

(Optional) The player instance representing who ran the command, if they are still cached.

playerId

number

The UserId of the player who ran the command.

playerUsername

string

The username of the player who ran the command.

timestamp

number

Unix timestamp of when the command was run.

#Methods

Method

Modifiers

Description

_patch(data)

Patches the CommandLog structure with new raw data.

toJSON()

Converts this CommandLog instance to raw JSON representation.