EbonJaeger / PerWorldInventory

Spigot multi-world inventory management
GNU General Public License v3.0
21 stars 17 forks source link

Imported worlds: inventories empty #221

Open JdeFalconr opened 7 years ago

JdeFalconr commented 7 years ago

I just fired up Multiverse 2 and PWI and after importing my existing worlds into Multiverse I've found that all inventories are empty when going to those worlds. However for the base world ("world") PWI retained my inventory just fine. I've made sure to define all of the imported worlds as separate groups in the worlds.yml file. When TP'ing to the world I get an error in chat the first time into a world "Something went horribly wrong when loading your inventory! Please notify a server administrator!" On subsequent loads that message does not appear.

In server logs: [18:46:11] [Server thread/INFO]: JdeFalconr issued server command: /mv tp world_4 [18:46:11] [Craft Scheduler Thread - 192/ERROR]: [PerWorldInventory] Unable to find inventory data for player 'JdeFalconr' for group 'world4': [FileNotFoundException] plugins\PerWorldInventory\data\defaults__default.json (The system cannot find the file specified) [18:46:11] [Craft Scheduler Thread - 192/WARN]: java.io.FileNotFoundException: plugins\PerWorldInventory\data\defaults__default.json (The system cannot find the file specified) [18:46:11] [Craft Scheduler Thread - 192/WARN]: at java.io.FileInputStream.open0(Native Method) [18:46:11] [Craft Scheduler Thread - 192/WARN]: at java.io.FileInputStream.open(Unknown Source) [18:46:11] [Craft Scheduler Thread - 192/WARN]: at java.io.FileInputStream.(Unknown Source) [18:46:11] [Craft Scheduler Thread - 192/WARN]: at java.io.FileReader.(Unknown Source) [18:46:11] [Craft Scheduler Thread - 192/WARN]: at me.gnat008.perworldinventory.data.FlatFile.getFromDefaults(FlatFile.java:165) [18:46:11] [Craft Scheduler Thread - 192/WARN]: at me.gnat008.perworldinventory.data.FlatFile.lambda$getFromDatabase$2(FlatFile.java:124) [18:46:11] [Craft Scheduler Thread - 192/WARN]: at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftTask.run(CraftTask.java:71) [18:46:11] [Craft Scheduler Thread - 192/WARN]: at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) [18:46:11] [Craft Scheduler Thread - 192/WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [18:46:11] [Craft Scheduler Thread - 192/WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [18:46:11] [Craft Scheduler Thread - 192/WARN]: at java.lang.Thread.run(Unknown Source) [18:51:59] [Server thread/INFO]: JdeFalconr issued server command: /mv set spawn [18:52:15] [Server thread/INFO]: JdeFalconr issued server command: /mv tp AWholeNewWorld_Nov2015_5 [18:52:15] [Craft Scheduler Thread - 195/ERROR]: [PerWorldInventory] Unable to find inventory data for player 'JdeFalconr' for group 'world5': [FileNotFoundException] plugins\PerWorldInventory\data\defaults__default.json (The system cannot find the file specified) [18:52:15] [Craft Scheduler Thread - 195/WARN]: java.io.FileNotFoundException: plugins\PerWorldInventory\data\defaults__default.json (The system cannot find the file specified) [18:52:15] [Craft Scheduler Thread - 195/WARN]: at java.io.FileInputStream.open0(Native Method) [18:52:15] [Craft Scheduler Thread - 195/WARN]: at java.io.FileInputStream.open(Unknown Source) [18:52:15] [Craft Scheduler Thread - 195/WARN]: at java.io.FileInputStream.(Unknown Source) [18:52:15] [Craft Scheduler Thread - 195/WARN]: at java.io.FileReader.(Unknown Source) [18:52:15] [Craft Scheduler Thread - 195/WARN]: at me.gnat008.perworldinventory.data.FlatFile.getFromDefaults(FlatFile.java:165) [18:52:15] [Craft Scheduler Thread - 195/WARN]: at me.gnat008.perworldinventory.data.FlatFile.lambda$getFromDatabase$2(FlatFile.java:124) [18:52:15] [Craft Scheduler Thread - 195/WARN]: at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftTask.run(CraftTask.java:71) [18:52:15] [Craft Scheduler Thread - 195/WARN]: at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) [18:52:15] [Craft Scheduler Thread - 195/WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [18:52:15] [Craft Scheduler Thread - 195/WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [18:52:15] [Craft Scheduler Thread - 195/WARN]: at java.lang.Thread.run(Unknown Source)

I did manually create the file _Default.json at the above location so that's probably what stopped the errors. However none of the inventories my player had for any of those previous worlds will load. How do I go about importing them into PWI?

DerkOttersberg commented 7 years ago

use /pwi convert multiverse Check the console but sometimes it does not show up if it is done converting. then i should work. It worked when i did it.

JdeFalconr commented 7 years ago

Thank you im4g1n4t1onsX, I appreciate the response. Is that a per-world command? I thought I'd run it previously but I can give it another go. Also is that applicable even if I never used Multiverse Inventories? All of the setup I'm working with (besides the existing MC server and worlds, of course) is a fresh install.

DerkOttersberg commented 7 years ago

yes it is a pworld command but you will need multiverse inventorys installed

EbonJaeger commented 7 years ago

Uh if you've never used MV-I, then converting will do nothing as there is literally nothing to convert. Also it is not per-world. @JdeFalconr What version of PWI are you running?

EbonJaeger commented 7 years ago

@im4g1n4t1onsX

yes it is a pworld command

No it isnt.

DerkOttersberg commented 7 years ago

no?

DerkOttersberg commented 7 years ago

oops?

EbonJaeger commented 7 years ago

Converting will convert everything at once.

DerkOttersberg commented 7 years ago

LOL but all of this worked for me

DerkOttersberg commented 7 years ago

ok

DerkOttersberg commented 7 years ago

just trying to help

JdeFalconr commented 7 years ago

Thanks everyone. I should be running v1.10.0 of PWI.

DerkOttersberg commented 7 years ago

does it work now?

EbonJaeger commented 7 years ago

I think I may have identified the problem in the code... Give me a moment.

JdeFalconr commented 7 years ago

Thank you!! I'll need to do testing when I get home later this evening. FYI I disabled PWI when I found it wasn't working so I'll have to re-enable the plugin, although I believe all of the original config files should still be present. My assumption is that it hasn't done anything to the player inventories from the original worlds but I have backups of all of the original files in case their inventories were somehow wiped.

DerkOttersberg commented 7 years ago

does it work now?

EbonJaeger commented 7 years ago

@JdeFalconr Could you test this version for me and tell me if it fixes this issue? https://drive.google.com/open?id=0B7hS84xeTkpsSzRUS1FkekFGbms

JdeFalconr commented 7 years ago

@Gnat008 Happy to. I'll give it a go later this evening and let you know.

DerkOttersberg commented 7 years ago

Can I download it to?

EbonJaeger commented 7 years ago

@im4g1n4t1onsX Yeah.

JdeFalconr commented 7 years ago

So interestingly enough that seemed to partially work. I noted that two different worlds for the first time exhibited different inventories. These two are the "current" game world (i.e. the one active on the server prior to setting up Multiverse and loading all of my "old" game worlds) plus one that I created after setting up Multiverse. Unfortunately all of the old game worlds' inventories remain completely empty. I checked and the players files (\Players) do not have recent modified dates so I don't believe they've been altered by PWI; thus the data should still be there. It looks like inventory files for each world are present at \plugins\PerWorldInventory\Data for my account but all of them except the ones corresponding to the two aforementioned worlds with inventories look like they're empty. Looking in the server log I don't see any error messages at all from PWI (attached). I've also included my \Plugins\PerWorldInventory\config.yml and worlds.yml files in case they're helpful.

Could the problem be related to all of those old game worlds I imported being created in older versions of Minecraft? I believe the newest of the "old" worlds was played up until v1.8.8 but probably created earlier.

worlds.yml.txt config.yml.txt latest.log.txt

EbonJaeger commented 7 years ago

World creation time doesn't matter, PWI operates completely independent from all of that. Let me look at those logs.

EbonJaeger commented 7 years ago

@JdeFalconr That log doesn't have any information. Could you turn on debug mode in the PWI config, reproduce the issue, and upload that log for me?

JdeFalconr commented 7 years ago

@Gnat008 Sorry I didn't see this until now. I'll gather that data later this evening when I'm back home and send it your way.

JdeFalconr commented 7 years ago

latest.log.txt

OK here you are. I enabled debug mode, stopped and restarted the server, logged in, went from my current world (where inventory works) to the "hub" world and then from there to two of my older imported worlds. Let me know if you need any other files.

JdeFalconr commented 7 years ago

Something else isn't right here. I re-entered the game, went between a few worlds, and upon going back to our "current" world my inventory is now completely empty.