PlayerSettingsManager

Manages player chat settings with YAML-based persistence. All settings are loaded into memory at startup and saved asynchronously on changes.

Constructors

Link copied to clipboard
constructor(storage: YamlPlayerSettingsStorage, logger: Logger)

Functions

Link copied to clipboard

Retrieves settings for a player. If settings don't exist, returns default settings.

Link copied to clipboard

Initializes the settings manager by loading all settings from disk into memory. This should be called once during plugin startup.

Link copied to clipboard
fun queueSave()

Queues a debounced asynchronous save, unless nothing has changed since the last write.

Link copied to clipboard

Forces an immediate synchronous save of all settings to disk.

Link copied to clipboard
open override fun stop()

Finishes outstanding work. Called once, on the shutdown path, off the tick thread.

Link copied to clipboard

Updates player settings in cache and queues async save to disk.