Package com.enhancedechest.service
Class StorageGateway
java.lang.Object
com.enhancedechest.service.StorageGateway
Thin async wrapper over
EnderChestStorage: every method dispatches a single synchronous
storage call onto the shared DbExecutor. Pure delegation — no session/dupe-safety logic
lives here (that is ChestSessionManager); these are the fire-and-report operations used by
the dialog callbacks, admin commands, and open routing.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclearPrimaryAsync(UUID owner) createChestAsync(UUID owner, int size, @Nullable Long expiresAt) Creates a NORMAL chest, expirable ifexpiresAtis non-null (epoch millis).createPermChestAsync(UUID owner, int size) Creates a permission-granted chest (kind=PERM); used by the permission-chest reconcile.findUuidByNameAsync(String name) Resolves a stored in-game name to its UUID (case-insensitive), or completes with null on a miss.getAppliedDefaultSizeAsync(UUID owner) Reads the persisted permission-managed base-chest baseline (0 = base chest is not managed).listChestsAsync(UUID owner) Loads every recorded (uuid, username, last-seen) triple once, to populatePlayerNameIndexat startup.renameAsync(UUID owner, int index, @Nullable String name) setIconAsync(UUID owner, int index, @Nullable String icon) Sets or clears a chest's icon (material key, or null to reset to the default icon).setPrimaryAsync(UUID owner, int index)
-
Constructor Details
-
StorageGateway
-
-
Method Details
-
listChestsAsync
-
createChestAsync
public CompletableFuture<Integer> createChestAsync(UUID owner, int size, @Nullable @Nullable Long expiresAt) Creates a NORMAL chest, expirable ifexpiresAtis non-null (epoch millis). -
createPermChestAsync
Creates a permission-granted chest (kind=PERM); used by the permission-chest reconcile. -
renameAsync
-
setIconAsync
Sets or clears a chest's icon (material key, or null to reset to the default icon). -
setPrimaryAsync
-
clearPrimaryAsync
-
getAppliedDefaultSizeAsync
Reads the persisted permission-managed base-chest baseline (0 = base chest is not managed). -
findUuidByNameAsync
Resolves a stored in-game name to its UUID (case-insensitive), or completes with null on a miss. -
loadAllPlayerNamesAsync
Loads every recorded (uuid, username, last-seen) triple once, to populatePlayerNameIndexat startup.
-