Closed Tuchan closed 6 months ago
Can still reproduce on v1.26
Can you send a minimal reproducible example, along with the server software version you're using?
Thanks GitHub for giving me a notification............. sorry.... (please ping me next time)
https://pastebin.com/C8iDej2j server version: paper-1.20.2-318.jar
@Tuchan Also works fine for me. Both stopping the server and letting it be stopped by the watchdog thread call plugin disable, which closes the inventories.
Apparently, 3 out of 4 server instances are broken somehow and this feature doesn't work on them, but a completely fresh install of paper is fine. This is a user error. Sorry for the trouble.
Whenever you use a multi window and the server crashes, the items don't get restored after joining back.
Since the contents are already saved and restored...
...would it be possible to serialize and save the player's inventory in a file (maybe datebase even) upon the server close? https://github.com/NichtStudioCode/InvUI/blob/f76896231c1be1bd4a7e9f09590d4debf8c05d3f/invui-core/src/main/java/xyz/xenondevs/invui/window/AbstractDoubleWindow.java#L26
This way, whenever a player joins back, it would see if the inventory was restored. If not, deserialize the data and: https://github.com/NichtStudioCode/InvUI/blob/f76896231c1be1bd4a7e9f09590d4debf8c05d3f/invui-core/src/main/java/xyz/xenondevs/invui/window/AbstractDoubleWindow.java#L64-L69