CommandLogManager

API reference for CommandLogManager in @erlcjs/core.

Manager responsible for fetching, caching, and updating CommandLog structures.

Signature:

declare class CommandLogManager

#Constructors

Constructor

Modifiers

Description

(constructor)(server, maxCacheSize)

Creates an instance of CommandLogManager.

#Properties

Property

Modifiers

Type

Description

cache

Collection<string, CommandLog>

Collection cache of logged commands, keyed by a composite Player:Timestamp:Command key.

#Methods

Method

Modifiers

Description

fetchAll()

Fetches all command logs from the game server. Updates the command log cache.

updateCache(rawCommands)

Re-synchronizes the cache with the raw command logs. Emits command event for new logs.