BanManager

API reference for BanManager in @erlcjs/core.

Manager responsible for fetching and caching the server's ban list.

Signature:

declare class BanManager

#Constructors

Constructor

Modifiers

Description

(constructor)(server)

Creates an instance of BanManager.

#Properties

Property

Modifiers

Type

Description

cache

Collection<number, Ban>

Collection cache of banned players, keyed by their UserId.

#Methods

Method

Modifiers

Description

fetchAll()

Fetches the server's ban list from the ER:LC API. Replaces the current cache.

updateCache(rawBans)

Re-synchronizes the cache with a raw ban list.