EbonJaeger / perworldinventory-kt

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

Players losing their inventories after moving between worlds #167

Closed Yufukuai closed 4 years ago

Yufukuai commented 4 years ago

Describe the bug After going to hub and coming back to the earlier world with inventories and important stuff, the players loose their inventories

To Reproduce Steps to reproduce the behavior:

  1. Do '/hub'
  2. Get back to the earlier world
  3. See error

Expected behavior I was expecting the plugin to keep the inventories correctly, but I see that the players can't get back their stuff after moving to another world and getting back to the starting point (which is the world that the player was earlier

Plugin version

Server version CraftBukkit version git-Spigot-21fe707-e1ebe52 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)

Additional context and logs [Craft Scheduler Thread - 25/WARN]: org.apache.commons.lang.UnhandledException: Plugin PerWorldInventory v2.2.2 generated an exception while executing task 1211 at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NoSuchFieldError: PLAYER_HEAD at me.ebonjaeger.perworldinventory.serialization.ItemSerializer.serialize(ItemSerializer.kt:44) at me.ebonjaeger.perworldinventory.serialization.InventorySerializer.serializeInventory(InventorySerializer.kt:43) at me.ebonjaeger.perworldinventory.serialization.InventorySerializer.serializeAllInventories(InventorySerializer.kt:24) at me.ebonjaeger.perworldinventory.serialization.PlayerSerializer.serialize(PlayerSerializer.kt:36) at me.ebonjaeger.perworldinventory.data.FlatFile.savePlayer(FlatFile.kt:43) at me.ebonjaeger.perworldinventory.data.ProfileManager$addPlayerProfile$1.invoke(ProfileManager.kt:59) at me.ebonjaeger.perworldinventory.data.ProfileManager$addPlayerProfile$1.invoke(ProfileManager.kt:20) at me.ebonjaeger.perworldinventory.service.BukkitService$sam$java_lang_Runnable$0.run(BukkitService.kt) at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) ... 3 more

[17:28:35] [Craft Scheduler Thread - 26/WARN]: Exception in thread "Craft Scheduler Thread - 26" [17:28:35] [Craft Scheduler Thread - 26/WARN]: org.apache.commons.lang.UnhandledException: Plugin PerWorldInventory v2.2.2 generated an exception while executing task 1253 at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NoSuchFieldError: PLAYER_HEAD at me.ebonjaeger.perworldinventory.serialization.ItemSerializer.serialize(ItemSerializer.kt:44) at me.ebonjaeger.perworldinventory.serialization.InventorySerializer.serializeInventory(InventorySerializer.kt:43) at me.ebonjaeger.perworldinventory.serialization.InventorySerializer.serializeAllInventories(InventorySerializer.kt:23) at me.ebonjaeger.perworldinventory.serialization.PlayerSerializer.serialize(PlayerSerializer.kt:36) at me.ebonjaeger.perworldinventory.data.FlatFile.savePlayer(FlatFile.kt:43) at me.ebonjaeger.perworldinventory.data.ProfileManager$addPlayerProfile$1.invoke(ProfileManager.kt:59) at me.ebonjaeger.perworldinventory.data.ProfileManager$addPlayerProfile$1.invoke(ProfileManager.kt:20) at me.ebonjaeger.perworldinventory.service.BukkitService$sam$java_lang_Runnable$0.run(BukkitService.kt) at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) ... 3 more

EbonJaeger commented 4 years ago

According to that stack trace, you are not using the legacy version which is needed to run on server versions earlier than 1.13. On top of that, 1.8 is very old and there have been so many server changes that PWI is not guaranteed to work on it.