Class CustomEnderChestReader
storage.type: yml player files and
decodes them into Bukkit ItemStack arrays, ready to be re-encoded into EnhancedEchest's own
storage.
Unlike AxVaults/PlayerVaultsX, CustomEnderChest gives each player a single ender chest (sized by
their highest-ranked permission), not several numbered vaults — matching EnhancedEchest's own base
chest #1. Each player's chest lives in a flat file plugins/CustomEnderChest/playerdata/<uuid>.yml
with the shape:
player-name: Steve enderchest-size: 27 enderchest-inventory: - DataVersion: 4671 id: minecraft:diamond_sword count: 1 schema_version: 1 - null - ...
enderchest-inventory has exactly enderchest-size entries, each either null
(empty slot) or a plain map in Bukkit's standard modern item-serialization shape (the same
id/count/components/DataVersion keys ItemStack.serialize()
itself produces since 1.20.5, plus CustomEnderChest's own schema_version marker, which
ItemStack.deserialize(Map) simply ignores). Since the list is nested inside
enderchest-inventory rather than a direct configuration-section key, Bukkit's YAML loader
hands each map back as a plain Map<String, Object> (not wrapped in a
ConfigurationSection), so it can be passed to ItemStack.deserialize(Map) as-is.
CustomEnderChest's h2 (default) and mysql backends are not read by this class —
an admin must set storage.type: yml in CustomEnderChest/config.yml and restart the
source server first (the same one-time switch AxVaults migration already asks for).
Stateless and holds no resources. YAML parsing and item deserialization are read-only against the frozen server registries and safe off the main thread (the migration runs on the shared DB executor).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne player's CustomEnderChest data as decoded for migration. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the owner UUIDs of every readable player file inplayerdata, skipping bad names.@Nullable CustomEnderChestReader.PlayerDataReads and decodes a single player's ender chest, or null if they have no file.booleanTrue if CustomEnderChest YAML player data is present (theplayerdatafolder holds at least one file).
-
Constructor Details
-
CustomEnderChestReader
-
-
Method Details
-
sourceAvailable
public boolean sourceAvailable()True if CustomEnderChest YAML player data is present (theplayerdatafolder holds at least one file). -
listOwners
Returns the owner UUIDs of every readable player file inplayerdata, skipping bad names.- Throws:
Exception
-
read
Reads and decodes a single player's ender chest, or null if they have no file.- Throws:
Exception
-