PerWorldInventory
PerWorldInventory copied to clipboard
Items are lost after players died in front of a portal
Hello, I found a "buggy-behavior" with this plugin. I wrote some conditions when it occured below.
1.Set spawn point in a world(call "WorldA"). 2.Go to the other world(WorldB) 3.Die in front of the portal to WorldA from WorldB. 4.Spawn in WorldA and go to WorldB. 5.Items that I had when I died in worldB is lost.(Nevertheless the sound of picking up items is heared.) *Players has a different inventory in each world.
I think this occurs because PWI records player's inventory when he dies and set the recorded-data(that makes his inventory empty) after he went through a portal and picked up his items.
What should I do to avoid it ?Can I do so by changing some values in Config?
Hmm. PWI actually doesn't listen for deaths, only world changes and gamemode changes.
@Gnat008 In this case, the world where the player dies and the one he respawn is different. So "World-changing-event" may occur right after he died, I think.
I understand how this occurs. I will try to explain it below. As a precondition, "separate-gamemode-inventories" is set true, and "default-gamemode" of main-world is set SURVIVAL and sub-world's is set CREATIVE. First, when I had died at spawn-point of main-world, I dropped all items around there, And I re-spawned at my bed in SUB-WORLD. PWI set my gamemode CREATIVE after I respawned. Second, in order to pickup my items, I went to main-world. No matter whether I used teleport-command or went through the portal, I spawned at the spawn-point in main-world(and that is where my items dropped at.) Third, as soon as I spawned in main-world, I picked up all my items around the spawn point.But, sadly, my gamemode at the time is still CREATIVE. PWI sets it SURVIVAL after I picked up them. In my server, players didn't be given the permission of changing gamemode, so this behavior looked like the bug which cause item-lost. Maybe this often occurs in delayed server. Although I set "separate-gamemode-inventories" false for a temporary measure, I would appreciate it if you could fix it. Sorry for my poor English.
Ahhh, I see. Okay, that makes sense. Thanks for the explanation!