Player lost backpack inventory without error.
wolfymation opened this issue · 4 comments
Information
Environment information
Plugin + server version info: Minepacks version 2.4.20.4 + Server Version git-Purpur-1985 MC: 1.19.4 + Java 17.0.7
<!-- Replace this with the output of "/backpack version". You can run the command in your console or as op ingame. -->
```[07:07:56 INFO]: ##### Start Minepacks version info #####
[07:07:56 INFO]: Minepacks: 2.4.20.4
[07:07:56 INFO]: Server: git-Purpur-1985 (MC: 1.19.4)
[07:07:56 INFO]: Java: 17.0.7
[07:07:56 INFO]: ##### End Minepacks version info #####
*Online mode*: no<!-- Replace this with "yes" if your server is running in online mode, with "no" if your server is running in offline mode (if you are using BungeeCord please use your BungeeCord online mode!) -->
*BungeeCord*: <!-- Replace this with "yes" you use BungeeCord, with "no" if not -->Using Velocity
**Server/crash log**
<!-- If you see an error message in the console/log please provide it. Please provide at least 10 lines befor and after the error! If you like to share the full log file please use https://gist.github.com/
The log can contain user related information like ip, name or uuid, so please replace them if they are not necessary. -->
```No error messages
<!-- Replace this with your crash log / link to your log file -->
none
Plugin config (optional)
<!-- Replace this with details about your config -->
Details
Description
One of my players lost his backpack without any error message. Others backpack work. In a previous version backpacks weren't able to load but since the latest release they all work, except for him. But with no errors.Steps to reproduce
Open backpack -> its emptyExpected behavior
open backpack -> not empty but having his stuffOther information (e.g. detailed explanation, related issues, suggestions how to fix, links for us to have context, screenshots, etc.)
The player probably interacted with the backpack after it didn't load initially. If you have a backup of the database, you could restore that backpack from the backup.
I will add logic to also create a backup of the backpack when it fails to load, to make restoring it simpler.
I have a backup and the old database.db file. How can I read this file? I only want to restore the backpack for that one player who had this issue.
Also, is there any function for automatic backups just for backpacks rn?
You can open the database files with DB Browser for SQLite.
You can open the backup file, go to the Browse Data
tab, check the player_id
column for the player. Then change the Table to backpacks
, look for the player id in the owner
column, select the BLOB text in the itemstacks
column. On the right side of the window there is a button for export that you can use to export the backpack from the backup. After that you can open your production database, go back to the backpacks table and search for the right column again and when selecting the BLOB again, you can use the import button on the right side to load the backup. Now click Write Changes
and you start your server.
Currently there is only manual backup and automatic backup if the plugin detects an issue saving the backpack.