YamlLocationRepository

Flat-file LocationRepository: one YAML file per owner under userdata/<uuid>.yml with a locations: list of x;y;z;world strings — the same on-disk format the original plugin used, so existing servers' data loads unchanged.

Unlike the old code (which rewrote every owner's file on every change), writes are per-owner and incremental: saveOwners only touches the owners it is given, and deletes the file of an owner left with no locations.

Constructors

Link copied to clipboard
constructor(dataFolder: File, logger: Logger)

Functions

Link copied to clipboard
open fun close()

Releases any resources (e.g. a connection pool). No-op for file backends.

Link copied to clipboard
open override fun loadAll(): List<DespawnLocation>

Loads every stored location. Malformed entries are skipped, not fatal.

Link copied to clipboard
open override fun saveOwners(owners: Collection<UUID>, locationsOf: (UUID) -> Collection<DespawnLocation>)

Persists exactly the owners in owners, sourcing each owner's current locations from locationsOf. An owner with no locations is removed from storage. This is the incremental write path — callers pass only the owners that changed.