-
-
Notifications
You must be signed in to change notification settings - Fork 19
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 stay in your inventory after server restart when using multi window #65
Comments
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.... https://pastebin.com/C8iDej2j |
@Tuchan |
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...
![note](https://private-user-images.githubusercontent.com/43300571/306400690-372e0ab1-7b79-478c-86f6-f31bdf56e45f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE1MTg3ODEsIm5iZiI6MTcyMTUxODQ4MSwicGF0aCI6Ii80MzMwMDU3MS8zMDY0MDA2OTAtMzcyZTBhYjEtN2I3OS00NzhjLTg2ZjYtZjMxYmRmNTZlNDVmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIwVDIzMzQ0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA3ZjY5NWZhNmFlNTc0NDAxMGRmZjBjODM4Nzg2ZTY4YmM3YjdkMWQ2YWYwYTM2NzZjY2Q3NTg3YzBjOGYyMzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.-gmUFItgy8kkZ1QOLcn2mPETzktKNkl2IrpkcEpOWvk)
...would it be possible to serialize and save the player's inventory in a file (maybe datebase even) upon the server close?
InvUI/invui-core/src/main/java/xyz/xenondevs/invui/window/AbstractDoubleWindow.java
Line 26 in f768962
This way, whenever a player joins back, it would see if the inventory was restored. If not, deserialize the data and:
InvUI/invui-core/src/main/java/xyz/xenondevs/invui/window/AbstractDoubleWindow.java
Lines 64 to 69 in f768962
The text was updated successfully, but these errors were encountered: