Vault Inventory
基于 Fabric 服务器的操作触发、磁盘持久化库存备份。为管理员测试会话提供手动和自动的安全网——在加载新模组或进行高风险更改前进行快照,若出现问题可恢复。

命令
/vault snapshot [player] [label] — 保存快照(未指定玩家时保存所有在线玩家的快照)
/vault list <player> — 显示某玩家已保存的快照
/vault restore <player> [#] — 恢复快照(未指定编号时恢复最新的快照)
快照会捕获背包、盔甲、副手以及末影箱的内容——包含附魔和其他组件在内的完整物品数据,而不仅仅是 ID 和数量。每次执行 /vault restore 之前,都会先对目标当前的库存进行一次安全快照,因此错误的恢复绝不会是单程票——只需再次恢复即可撤销。

服务器还会每游戏日(可配置)对所有在线玩家自动执行一次快照。
权限
需要 vaultinventory.command 权限节点。默认情况下与原版 OP(等级 2+)兼容;通过 LuckPerms 或任何兼容 Fabric-permissions-api 的插件授予该节点以允许非 OP 玩家使用。
配置
config/vault-inventory.json:
maxSnapshotsPerPlayer(默认值 99)— 超出此数量的最旧快照将被清理
autoSnapshotIntervalTicks(默认值 24000,即一个原版游戏日)— 设置为 0 以禁用自动快照
依赖
Fabric API。仅服务端内容——无客户端内容。
Vault Inventory
Op-triggered, disk-persisted inventory backups for Fabric servers. A manual and automatic safety net for admin testing sessions — snapshot before loading a new mod or making a risky change, restore if something goes wrong.

Commands
/vault snapshot [player] [label] — save a snapshot (all online players if none given)
/vault list <player> — show a player's saved snapshots
/vault restore <player> [#] — restore a snapshot (newest if no number given)
Snapshots capture inventory, armor, offhand, and ender chest — full item data including enchantments and other components, not just IDs and counts. Every /vault restore first takes a safety snapshot of the target's current inventory, so a bad restore is never a one-way trip — just restore again to undo it.

The server also auto-snapshots every online player once per in-game day (configurable).
Permissions
Requires the vaultinventory.command permission node. Works out of the box with vanilla op (level 2+); grant the node through LuckPerms or any Fabric-permissions-api-compatible plugin to allow non-op access.
Configuration
config/vault-inventory.json:
maxSnapshotsPerPlayer (default 99) — oldest snapshots are pruned beyond this
autoSnapshotIntervalTicks (default 24000, one vanilla day) — set to 0 to disable auto-snapshots
Requirements
Fabric API. Server-side only — no client-side content.
评论 0
登录后参与评分
还没有评论,来抢沙发吧