Sueta

[Skript] InventorySaver - Advanced Inventory Backup & Restor

1.0

inventory backup restore save gui skript offline-support yaml armor offhand inventory-viewer invento

·Plugin

InventorySaver is a powerful and lightweight Skript addon for Minecraft servers. It allows you to automatically or manually back up player inventories, including armor and off-hand items, and easily restore or inspect backups later.

Features

  • ✅ Manual inventory saving via commands
  • ✅ Auto-saving at configurable intervals
  • ✅ Armor and off-hand support
  • ✅ Inventory preview GUI (/checkinv)
  • ✅ Per-player YAML file storage
  • ✅ Limits max backups to save space
  • ✅ Configurable messages and prefix
  • ✅ Admin reload and cleanup commands

Requirements

  • Skript
  • SkQuery
  • skript-yaml

Place InventorySaver.sk into your plugins/Skript/scripts/ folder and restart the server.

Commands

Command
Description Permission
/saveinv <player> Save a specific player's inventory inventorysaver.save
/saveallinv Save all online players' inventories inventorysaver.save
/restoreinv <player> <#> Restore a specific backup to an online player inventorysaver.restore
/checkinv <player> <#> Preview a backup in a GUI inventorysaver.view
/listinv <player> List all backups of a player inventorysaver.view
/invreload Reload config and messages inventorysaver.admin
/invhelp Show help info and available commands inventorysaver.view
⚙️ Configuration

config.yml
Customize these values under plugins/InventorySaver/config.yml:

settings:
  save-interval: 3
  max-backups: 5
  prefix: "&7[&bInventorySaver&7] "

messages.yml

messages:
    must-be-online: "&cThat player must be online."
    saved: "&aSaved inventory for &f{player}&a as backup &f{id}&a."
    saved-all: "&aSaved all online player inventories."
    saved-single: "&aInventory for &f{player}&a saved successfully."
    restored: "&aRestored inventory &f#{index}&a for &f{player}&a."
    no-backups: "&cNo backups found for {player}."
    invalid-number: "&cInvalid number."
    backup-does-not-exist: "&cThat backup does not exist."
    player-must-be-online: "&cPlayer must be online to restore inventory."
    list-header: "&eBackups for &f{player}&e:"
    list-entry: "&6{index}: &f{timestamp}"
    inventory-empty: "&cInventory is empty. Backup not saved."

Data Storage

  • Backups are stored in:
    plugins/InventorySaver/data/<UUID>.yml

    exaple data storage

    backups:
    - 21/06/2025_21-39-15
    - 21/06/2025_21-39-47
    
    inventory:
        21/06/2025_21-39-15:
            armor:
                helmet:
                    ==: org.bukkit.inventory.ItemStack
                    v: 4189
                    type: DIAMOND_HELMET
                chestplate:
                    ==: org.bukkit.inventory.ItemStack
                    v: 4189
                    type: DIAMOND_CHESTPLATE
                    meta:
                        ==: ItemMeta
                        meta-type: ARMOR
                        enchants:
                            minecraft:protection: 4
                leggings:
                    ==: org.bukkit.inventory.ItemStack
                    v: 4189
                    type: DIAMOND_LEGGINGS
                boots:
                    ==: org.bukkit.inventory.ItemStack
                    v: 4189
                    type: DIAMOND_BOOTS
            offhand:
                ==: org.bukkit.inventory.ItemStack
                v: 4189
                type: DIAMOND_LEGGINGS
        21/06/2025_21-39-47:
            armor:
                helmet:
                    ==: org.bukkit.inventory.ItemStack
                    v: 4189
                    type: AIR
                    amount: 0
                chestplate:
                    ==: org.bukkit.inventory.ItemStack
                    v: 4189
                    type: AIR
                    amount: 0
                leggings:
                    ==: org.bukkit.inventory.ItemStack
                    v: 4189
                    type: AIR
                    amount: 0
                boots:
                    ==: org.bukkit.inventory.ItemStack
                    v: 4189
                    type: AIR
                    amount: 0
            offhand:
                ==: org.bukkit.inventory.ItemStack
                v: 4189
                type: ICE

Example Use
/saveinv Steve
/checkinv Steve 1
/restoreinv Steve 1

Support
If you encounter issues or have suggestions, feel free to ask for support or request improvements.

Similar projects

Plugin →