Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Items saved in player inventory on server crash. #84

Open
NicoNekoDev opened this issue Aug 2, 2024 · 2 comments
Open

Items saved in player inventory on server crash. #84

NicoNekoDev opened this issue Aug 2, 2024 · 2 comments

Comments

@NicoNekoDev
Copy link

If a server crashes while a player have a split window open, the items remains in their inventory.

Steps to reproduce:

  1. create a split window, fill the bottom with items, and open it
  2. go to console and do a /save-all (keep the gui open!)
  3. crash the server (keep the gui open!) - one way is killing the java process manually

What is observed is that after the restart, the player has the gui items in their inventory and they can play with them. Also, their previous inventory is not restored, so RIP items if the player has any.

@NichtStudioCode
Copy link
Owner

NichtStudioCode commented Aug 3, 2024

I am aware of this problem. Outside of forcefully terminating the process this shouldn't happen though, as the server still disables the plugin in the case of a crash (unhandled exception / watchdog thread terminating the server).

I may look into making inventories completely packet-based in the future to fix these issues, but that would be in a v2 of InvUI without multi-version support.

@NicoNekoDev
Copy link
Author

One other way is to store the player inventory under a namespace key in their persistent data container, and restore the inventory if that key is present when the player joins the server again. Or at least that's how I would implemented it. However, there's no persistent data container under version 1.16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants