Minepacks Update - Crash-Safe Backpack Saving / Anti-Dupe Improvements
This update focuses heavily on backpack data safety, especially in cases where the server runs out of disk space, SQLite fails to write, or the server shuts down while backpacks are open.
A previous issue could allow a backpack item duplication scenario if a player removed an item from their backpack, the database failed to save, and the server later loaded the older backpack state again. This update adds multiple layers of protection to prevent that.
Changes
- Added crash-safe backpack saving
Backpack saves now report whether they succeeded or failed instead of silently logging errors.
- Added storage failure protection
If the plugin detects a serious database/storage failure, backpacks are automatically locked to prevent further editing until the server storage issue is fixed.
- Added anti-dupe rollback protection
When a player opens an editable backpack, the plugin now snapshots:
- Backpack contents
- Player inventory contents
- Armor contents
- Offhand item
- Cursor item
If saving fails when the backpack closes, the player and backpack are rolled back to the safe pre-edit state.
- Improved SQLite save handling
Backpack saves now use safer transaction handling with rollback support if a database write fails.
- Improved disk-full / database-error handling
The plugin now detects common storage failure cases such as:
- Database or disk full
- SQLite full errors
- Disk I/O errors
- Readonly database errors
- No space left on device
- Fixed unsafe dirty-state handling
Backpacks are no longer marked as saved unless the database save actually succeeds.
- Fixed backpack close saving
Backpack contents are now properly handled when the inventory closes, including custom-title backpack inventories.
- Fixed custom-title inventory syncing
When a backpack is opened with a custom title, changes are now copied back into the real backpack inventory before saving.
- Added protection against multiple editable viewers
Only one player can edit the same backpack at a time, preventing conflicting edits and unsafe save states.
- Improved read-only backpack protection
Read-only viewers are prevented from modifying backpack contents through clicks or drags.
- Improved shutdown safety
Open backpacks are closed before database shutdown so the latest inventory state can be processed before saving.
- Improved cache unloading safety
Backpacks are no longer unloaded from memory if their save fails.
- Improved corrupted-data safety
Backpack deserialization failures no longer silently create an empty backpack, preventing accidental data loss.
- Improved inventory detection
Backpack inventories are now detected more safely using the inventory holder, reducing issues with unregistering inventories while multiple viewers are involved.
- Improved backpack resizing safety
Backpack resizing now clones existing contents and only replaces the cached backpack after the resized backpack has been saved successfully.
Why this update matters
This update is mainly designed to protect servers from item duplication caused by failed database writes.
If the server storage becomes full or SQLite cannot save backpack data, the plugin now fails safely instead of allowing players to continue editing backpacks with unsaved changes.
Recommended after updating
- Make sure your server has enough free disk space.
- Check your console for any SQLite or storage-related errors.
- Restart the server after installing the update.
- If backpacks are locked, fix the storage/database issue and restart the server.
Summary
This is a stability and safety update focused on preventing backpack-related item duplication during database, disk space, or shutdown failures.
Please consider leaving a good review for the plugin.
Discord Support