Restore a player's inventory
Hand back what a player was carrying before a death or a bug, from copies kept for several days.
ExyliaStaff keeps copies of what players carry, so a staff member reading a report three days later can look at what the player really had and give it back, whole or in parts. Copies are database rows, not files, so every server of the network reads the same history.
Before you start#
- Staff need
exyliastaff.restore. Two buttons need more:exyliastaff.restore.log(restore history) andexyliastaff.restore.purge(delete every backup of a player). - The module switch is
modules.inventory-restoreinplugins/ExyliaStaff/config.yml, on by default. Settings are inplugins/ExyliaStaff/modules/restore/config.yml. - Backups are taken automatically and stored in the plugin's database; there is nothing to set up.
Steps#
Open the player's inventories
Run /invrestore <player> (aliases /inventoryrestore and /restoreinv). Any name connected to the proxy is suggested, online or not. If the player's backups come from more than one server, the SERVERS screen opens first, current server first; pick one, or Servers ▸ Every server. With a single server it goes straight to INVENTORIES. Console cannot use the command.
Pick the backup
INVENTORIES lists the backups newest first, each with the icon of its cause and a line saying what the event was. The tabs filter them: Everything, Deaths, Joins and quits, World changes and Staff saves. Click a backup to open it.
Check what they had
BACKUP shows the inventory with its armour and off-hand zones. Empty slots are shown as air, so what you see is what they had. A death backup also shows the cause and Killed by. To give back a single item, click it in the preview.
Choose what to hand back
Click Backup ▸ Restore. On RESTORE, click each part to tick it. The Items button switches between replacing what they carry and adding to it. Click Restore ▸ Confirm to hand it back.
Check that it works#
Run /invrestore <a player online> and click Backups ▸ Save now. A backup with the Staff saves cause appears in INVENTORIES right away. Open it, tick Inventory and confirm: the player is told that you restored it (notify-target).
Going further#
What you can hand back#
Eleven parts, ticked one by one: Inventory, Armor, Off hand, Ender chest, Experience, Health, Hunger, Potion effects, Game mode, Flight and Location.
default-parts is what is already ticked when the screen opens: inventory, armour, off hand, experience, health and hunger. A list that leaves nothing valid falls back to those six.
The four parts made of items (inventory, armour, off hand, ender chest) can be written over what the player carries or added to it. default-replace (true) decides which one the screen opens on. Either way their current items are saved first as a Before a restore backup, so a wrong choice is one restore away from being undone. Location is never applied across servers.
Save a copy now#
In INVENTORIES, Backups ▸ Save now copies what the player carries at this moment. The player must be on this server; otherwise you are told there is nothing to copy.
Restore a player who is offline#
The hand-back is queued with its own copy of the items and the parts you ticked, and lands the moment they join (their arrival backup is written first). If they are online on another server, that server is notified so the delivery happens at once. Backups ▸ Waiting [n] drops what is still owed.
Delete backups and read the history#
Backup ▸ Delete on a backup removes it, after a confirm screen. Backups ▸ Delete everything (shift left click, needs exyliastaff.restore.purge) removes every backup of that player. Backups ▸ Restore history (needs exyliastaff.restore.log) shows who handed what to whom, readable from either end: what a staff member gave out and what a player received.
Watch what happened#
A death backup has Backup ▸ Watch what happened when the replays module is on: the minute before that death, to decide whether it was fair. If item revocation is on, the restore screen of a death that dropped marked items also has the Revoke switch.
How long backups are kept#
| Setting | Default | Meaning |
|---|---|---|
keep-per-player | 20 | Backups kept per player (never more than 100). The oldest go as new ones arrive. |
keep-days | 14 | Days a backup is kept. 0 keeps them until the count drops them. |
history-keep-days | 90 | Days the restore history is kept. 0 keeps it forever. |
Deaths and manual saves are not pushed out by the count; they stay until keep-days takes them. The cleanup runs at start and every five minutes, from one server of the network at a time.
When a copy is taken, and the config keys
| Cause | Icon | Switch |
|---|---|---|
| Death | SKELETON_SKULL | causes.death |
| Quit | IRON_DOOR | causes.quit |
| Join | OAK_DOOR | causes.join |
| World change | ENDER_PEARL | causes.world-change |
| Manual save | WRITABLE_BOOK | always on |
| Before a restore | CLOCK | always on |
All four switches are true by default. The last two have no switch on purpose: a manual save is a staff member asking, and the copy before a restore is what makes a restore undoable.
A copy is written only when there is something to copy, ender chest included. min-seconds-between (60) is the gap between two ordinary backups of the same player; deaths, quits and manual saves ignore it. The quit and join copies are skipped while the server is stopping, because Paper disconnects every player before it disables plugins.
keep-per-player: 20
keep-days: 14
history-keep-days: 90
min-seconds-between: 60
default-parts: [INVENTORY, ARMOR, OFF_HAND, EXPERIENCE, HEALTH, HUNGER]
default-replace: true
notify-target: true
causes: { death: true, quit: true, join: true, world-change: true }The argument of /invrestore is a network name. A name this server has never seen is asked of the proxy through the staff member who typed it, which is why console cannot use it.
Commands and permissions#
| Command | What it does | Permission |
|---|---|---|
/invrestore [player] | Open the saved inventories of a player and hand them back. | exyliastaff.restore |
| Permission | Who has it | What it allows |
|---|---|---|
exyliastaff.restore | Admins (op) | Open the saved inventories of a player and hand them back. |
exyliastaff.restore.log | Admins (op) | Read the restore history. |
exyliastaff.restore.purge | Admins (op) | Throw away every backup of a player. |
Something missing on this page? Tell us on Discord