Interface DataStorage
public interface DataStorage
The single storage abstraction point: swapped wholesale at startup based on
storage.type
in config.yml (SQLite by default). Every backend (SQL over HikariCP, MongoDB, or flat
JSON) implements this same contract, so nothing above this layer - services, commands, expansions
- ever needs to know which one is active.
Every operation exposed through the repositories below runs off the main/region thread; call
sites are expected to hop back onto the appropriate SchedulerAdapter thread themselves
before touching Bukkit API with the result.
-
Method Details
-
type
StorageType type() -
connect
CompletableFuture<Void> connect() -
disconnect
CompletableFuture<Void> disconnect() -
isConnected
boolean isConnected() -
migrate
CompletableFuture<Void> migrate()Applies pending schema migrations. No-op for backends with no schema (JSON). -
playerProfiles
PlayerProfileRepository playerProfiles() -
homes
HomeRepository homes() -
warps
WarpRepository warps() -
economy
EconomyRepository economy() -
kits
KitRepository kits() -
punishments
PunishmentRepository punishments() -
auctions
AuctionRepository auctions() -
shop
ShopRepository shop() -
playerShops
PlayerShopRepository playerShops() -
tickets
TicketRepository tickets()
-