Class AxVaultsReader

java.lang.Object
com.enhancedechest.migration.AxVaultsReader
All Implemented Interfaces:
AutoCloseable

public final class AxVaultsReader extends Object implements AutoCloseable
Reads an AxVaults (Artillex-Studios) database directly and decodes its vault contents into Bukkit ItemStack arrays, ready to be re-encoded into EnhancedEchest's own storage.

AxVaults stores one row per (player, vault) in axvaults_data(id, uuid, storage, icon). The storage blob is the AxAPI Serializers.ITEM_ARRAY framing — a big-endian int slot count, then per slot a unsigned short byte length (0 = empty) followed by that many bytes. Each item's bytes are gzip-compressed NBT with a DataVersion tag, exactly what Paper's ItemStack.serializeAsBytes() produces, so each one decodes via ItemStack.deserializeBytes(byte[]) (which also runs the DataFixerUpper across versions).

Reads the SQLite backend (data.db) only, opened read-only so it can be read while the source server still holds the file. Installs running AxVaults' default H2 backend (data.mv.db) must switch AxVaults to database.type: sqlite before migrating.

Not thread-safe; create, use and close() on a single thread (the migration runs on the shared DB executor). Item (de)serialization is read-only against the frozen server registries and is safe off the main thread.