EbonJaeger / perworldinventory-kt

Multi-world inventory plugin for Spigot written in Kotlin.
MIT License
46 stars 35 forks source link

Convert from PWI back to default .DAT files #168

Open Amblyopia opened 4 years ago

Amblyopia commented 4 years ago

Converting from a Multi-Verse server to a BungeeCord server and need the PWI inventory files converted back to .DAT files in the world playerdata folder

Would like a command to convert PWI back to default style .DAT files.

An alternative would be to have a conversion tool that could read the inventory .json files and output the inventory so that it can be manually given to a player.

Example: plugins/PerWorldInventory/data/beed4731-8d35-4646-8bc1-f071b1a165d4/survival.json would be converted to survival/playerdata/beed4731-8d35-4646-8bc1-f071b1a165d4.dat

EbonJaeger commented 4 years ago

The player's .dat file stores their current inventory at all times; that isn't changed by PWI. PWI just saves everything out separately into its own data folder as well. So whatever inventory a player currently has or last logged off with is what is in the .dat files.

Amblyopia commented 4 years ago

Oh, I see the issue. The dat files were being saved in world/playerdata but I don't have a world named "world" where all the old dat files should be because it's been deleted since it wasn't used.

It may have been saving them there because that was the default world in the server.properties that I never messed with.

But I do still have all the json files from the world named survival.