InventoryHistory
Records inventory history of players, especially useful for laggy servers where players false-die often.
InventoryHistory
InventoryHistory - PaperMC Plugin
A PaperMC 1.21.1 plugin that tracks player inventory history and allows administrators to view, restore, and duplicate inventory snapshots.
Features
- SQLite Database: Saves inventory snapshots every 5 minutes for all online players - SQLite Database: Saves a final snapshot when players log out - SQLite Database: View any player's inventory history with pagination and clickable links - SQLite Database: Interactive inventory GUI to browse snapshot contents - SQLite Database: Restore a player's inventory from any historical snapshot - SQLite Database: Copy items from a snapshot to your own inventory - SQLite Database: Snapshots older than 1 month are automatically removed - SQLite Database: Lightweight, file-based storage - no external database required
Requirements
- PaperMC 1.21.1 or later - Java 21 or later
Installation
1. Download the JAR file 2. Place it in your server's `plugins` folder 3. Start the server 4. The plugin creates a database at `plugins/InventoryHistory/inventory_history.db`
Commands
| Command | Description | Permission | |---------|-------------|------------| | `/invhist <player> [page]` | View player's inventory history | `inventoryhistory.view` | | `/invhist open <player> <id>` | Open snapshot in GUI | `inventoryhistory.view` | | `/invhist restore <player> <id>` | Restore player's inventory | `inventoryhistory.restore` | | `/invhist duplicate <player> <id>` | Copy items to your inventory | `inventoryhistory.duplicate` | | `/invhist cleanup` | Delete old snapshots | `inventoryhistory.admin` |
Aliases: `/inventoryhistory`, `/invhist`, `/ih`
Permissions
| Permission | Description | Default | |------------|-------------|---------| | `inventoryhistory.view` | View inventory history | OP | | `inventoryhistory.restore` | Restore inventories | OP | | `inventoryhistory.duplicate` | Duplicate inventory items | OP | | `inventoryhistory.admin` | Full admin access | OP |
Usage Examples
View a player's inventory history
``` /invhist Notch /invhist Notch 2 ``` Shows a paginated list with clickable links to view, restore, or copy each snapshot.
Open a snapshot in GUI
``` /invhist open Notch 123 ``` Opens an interactive inventory showing all items, armor, and off-hand slot with action buttons.
Restore a player's inventory
``` /invhist restore Notch 123 ``` Restores Notch's inventory to exactly how it was in snapshot #123. Player must be online.
Copy items to your inventory
``` /invhist duplicate Notch 123 ``` Copies all items from the snapshot to your inventory. Overflow drops on the ground.
Cleanup old snapshots
``` /invhist cleanup ``` Manually deletes snapshots older than 30 days.
How It Works
- Snapshots are saved every 5 minutes for online players - A final snapshot is saved when players disconnect - Snapshots older than 30 days are automatically deleted hourly - Data is stored in SQLite at `plugins/InventoryHistory/inventory_history.db`
License
This plugin is provided as-is for personal and server use.