Package com.enhancedechest.migration
Class PlayerVaultsXMigrationService
java.lang.Object
com.enhancedechest.migration.PlayerVaultsXMigrationService
Migrates vaults from a PlayerVaultsX installation into EnhancedEchest's storage.
Each PlayerVaultsX 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 PlayerVaultsXReader; this class only resizes/encodes/writes into
storage. (PlayerVaultsX vault numbers and EnhancedEchest chest indices are both 1-based, so the
mapping is direct.)
-
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 PlayerVaultsX vault folder.migratePlayer(UUID owner) Migrates a single player by UUID.booleanTrue if a PlayerVaultsX vault-data folder with at least one player file is present to migrate from.
-
Constructor Details
-
PlayerVaultsXMigrationService
public PlayerVaultsXMigrationService()
-
-
Method Details
-
sourceAvailable
public boolean sourceAvailable()True if a PlayerVaultsX vault-data folder with at least one player file is present to migrate from. -
migrateAll
Migrates every player found in the PlayerVaultsX vault folder.- Throws:
Exception
-
migratePlayer
Migrates a single player by UUID. Returns the same counters scoped to that player.- Throws:
Exception
-