Package com.enhancedechest.migration
Class AxVaultsMigrationService
java.lang.Object
com.enhancedechest.migration.AxVaultsMigrationService
Migrates vaults from an AxVaults installation into EnhancedEchest's storage.
Each AxVaults vault is imported into the EnhancedEchest chest at the same index (vault #3 → chest #3), so a player's layout carries over. A vault is only written when no chest already holds data at that index — a chest with existing contents is left untouched and counted as skipped, which makes the migration safe to re-run and prevents it from ever overwriting live data.
All work here is synchronous; callers dispatch it onto the shared DB executor. The vault items
are already decoded by AxVaultsReader; this class only resizes/encodes/writes into storage.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOutcome of a migration run. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMigrates every player found in the AxVaults database.migratePlayer(UUID owner) Migrates a single player by UUID.booleanTrue if an AxVaults database file is present to migrate from.
-
Constructor Details
-
AxVaultsMigrationService
public AxVaultsMigrationService()
-
-
Method Details
-
sourceAvailable
public boolean sourceAvailable()True if an AxVaults database file is present to migrate from. -
migrateAll
Migrates every player found in the AxVaults database.- Throws:
Exception
-
migratePlayer
Migrates a single player by UUID. Returns the same counters scoped to that player.- Throws:
Exception
-