Klasse RegionSuggestionCache
java.lang.Object
de.delinkedde.areashopreborn.command.RegionSuggestionCache
Maintains immutable region-name snapshots for non-blocking command completion.
SQLite is queried only on the database executor. Brigadier suggestion calls read volatile immutable lists and therefore never wait for the database on the server thread.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungRegionSuggestionCache(Database database, EstateRepository estates, int maximumEntries) Creates an initially empty suggestion cache. -
Methodenübersicht
-
Konstruktordetails
-
RegionSuggestionCache
Creates an initially empty suggestion cache.- Parameter:
database- asynchronous database executorestates- estate repositorymaximumEntries- maximum names retained per suggestion category
-
-
Methodendetails
-
refresh
Rebuilds both snapshots asynchronously.- Gibt zurück:
- completion future containing the number of cached regions
-
regions
Returns a stable snapshot of user-facing names and WorldGuard-compatible identifiers.- Gibt zurück:
- immutable region identifier list
-
cities
Returns a stable snapshot containing city display names and protection identifiers only.- Gibt zurück:
- immutable city identifier list
-