Death Backup (Legacy Fabric)
Death Backup (Legacy Fabric)
This mod requires the library mod Collective (Fabric) and Fabric API.
Note: This version is for Fabric 1.16 and 1.17. For newer Fabric versions (1.18+) and Forge, please visit the main project page.
Death Backup is a useful utility that automatically saves a player's inventory right before their death. All data is written to files located in the world folder, ensuring functionality in both singleplayer and server environments.
Main Features
The mod creates backup copies of player equipment and items at the moment of death. Players with administrator privileges can restore saved inventory using special commands.
Commands
/deathbackup— displays available commands/deathbackup list— shows a list of recent deaths with corresponding indices/deathbackup load <index>— loads backup by specified index (index 0 always corresponds to the latest death)
Configuration
The mod supports flexible configuration through config file:
- sendBackupReminderMessageToThoseWithAccessOnDeath (default: true) — sends a message to players with admin rights about backup creation after death
- backupReminderMessage (default: "A backup of your inventory before death has been created. Use '/deathbackup load 0' to restore.") — backup reminder message text
Usage Examples
When a player dies, their inventory is saved to file: ./world-folder/data/deathbackup/time.txt

Command /deathbackup list displays all available backups:

Restoring latest inventory using command /deathbackup load 0:

The mod works correctly with items containing NBT tags, including enchanted items and written books:

Successful inventory restoration with saved items:
