Closed RoboMWM closed 7 years ago
is this where you're solely saving data?
Yes it is.
I'll add a listener for PlayerQuitEvent which should also be called when the player crashes or has connection issues.
I just got a temporarily free server to test my fix and didn't even run into the problem with the old version.
I made some cookies and pulled my networkcable to simulate network issues ;) When I reconnected I still had the cookies.
I still wasn't able to replicate this problem, but I added some code in my playerquit event that handles players who are still in a GUI or game when the event runs. So your problem shouldn't show up again.
In the beginnings of gamebox i tested whether InventoryCloseEvent fires when disconnecting and for normal cases it does. The inventory is closed and the event is called bevore removing the player.
Can't test at the moment, but someone who was disconnected via a network issue lost all the cookies they produced for that session (they had it open). I don't think InventoryCloseEvent fires when a player disconnects - is this where you're solely saving data?