Inventory Backups

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Sovde

Staff member
Moderator
Feb 18, 2022
21
2
3
Inventory Backups
Requires: skript-yaml, skript-gui


See the github page for the dev version, which may have bugs.

This skript automatically saves a backup of a player's inventory when they die. By default it stores 5 deaths back, but can be configured to whatever you want. The backups are stored in yml files, which by default are in plugins/Skript/scripts/inventory-backups/ but can also be changed.

The skript mainly runs through a GUI accessible through /invrestore <player>. This will show you a history of their backups, starting from most recent, with 5 shown per page. You can do multiple actions by clicking on these backups in various ways.

A left click will open the backup to you, showing all their items and allowing you to pull specific items out. This will not remove them from the backup, you're simply making a copy of the item. This screen will also show individual buttons for the other actions.

Right clicking will give the backup to the player without clearing their current inventory. If their inventory is full, the rest of the items will drop on the ground at the player. If you wish to clear their existing items, you can shift-right-click on the restore button when viewing the backup.

Shift-left-clicking will teleport you to the location that the player died.

Shift-right-clicking will delete the backup. Be careful.

Images:
View attachment 6655

View attachment 6656

View attachment 6654