DataGuard
再也不用担心进度丢失。
DataGuard 是一款专为 PaperMC 服务器打造的生存插件,旨在解决多人联机服务器中最令人头疼的问题之一——数据回滚。无论是因为服务器崩溃、从错误的日期恢复备份,还是其他幕后故障,DataGuard 都能确保玩家辛苦获得的进度始终可恢复。
?️ 功能介绍
DataGuard 会在关键时刻自动为玩家和服务器数据创建快照——每次玩家加入时、离开时,以及在线期间每 30 分钟一次。每个快照都会捕获所有重要信息:
- 物品栏内容
- 护甲与副手物品
- 末影箱内容
- 经验等级与进度
- 生命值与饥饿值
- 生效中的药水效果
- 玩家位置
- 游戏模式
无需数据库,也无需外部软件。所有数据均以结构化且人类可读的格式直接保存至服务器的文件系统中。
⚙️ 工作原理
每位玩家都拥有独立的快照文件夹,按时间戳组织。服务器级快照会一次性捕获所有在线玩家的数据,同时包含世界时间和在线人数等服务器元数据。旧快照会根据你配置的限制自动清理,防止磁盘空间失控。
管理员拥有完全控制权——可以通过简单的命令在任何时候手动创建、删除和加载任意快照。玩家拥有限制但实用的自主权,可以创建和删除自己的快照,并切换个人自动保存功能。
? 防滥用设计
普通成员无法使用 /data load 命令——这是有意为之的。如果允许玩家按需恢复自己的数据,将会导致物品复制漏洞。例如,一名玩家可以丢弃下界合金装备到地上,然后加载旧快照将装备重新拿回背包,再捡起地上的装备——从而免费复制出两份。只有拥有 dataguard.admin 权限的服务器工作人员才能恢复数据。
? 命令
管理员 / OP
/data server create [label] — 创建完整的服务器快照
/data server delete <label> — 删除服务器快照
/data server automatic <true/false> — 切换服务器全局自动保存
/data player create [player] [label] — 为特定玩家创建快照
/data player delete <player> <label> — 删除玩家的快照
/data load player <player> <snapshot> — 恢复玩家数据
/data load server <snapshot> — 从服务器快照恢复所有在线玩家
/data list server — 查看所有服务器快照
/data reload — 实时重载配置
普通成员
/data player create [label] — 手动保存自己的数据
/data player delete <label> — 删除自己的某个快照
/data automatic <true/false> — 切换个人自动保存
/data list player — 查看自己的快照
? 配置
所有设置均可在 config.yml 中调整:
- 自动保存间隔(默认:30 分钟)
- 保留的最大玩家快照数量(超出后旧快照将被清理)
- 保留的最大服务器快照数量
- 所有插件消息及聊天前缀
? 依赖要求
- 服务器: PaperMC 1.21.11
- Java: 21+
- 无额外依赖,无需安装其他插件。
DataGuard
Never Lose Your Progress Again.
DataGuard is a PaperMC survival plugin built to solve one of the most frustrating problems on multiplayer servers — data rollbacks. Whether your server crashes, restores a backup from the wrong date, or something just goes wrong behind the scenes, DataGuard makes sure your players' hard-earned progress is always recoverable.
?️ What It Does
DataGuard automatically takes snapshots of player and server data at key moments — every time a player joins, every time they leave, and every 30 minutes while they're online. Each snapshot captures everything that matters:
- Inventory contents
- Armor & offhand item
- Ender chest contents
- XP level & progress
- Health & hunger
- Active potion effects
- Player location
- Game mode
No databases, no external software. Everything is saved directly to your server's file system in an organized, human-readable format.
⚙️ How It Works
Every player gets their own snapshot folder, organized by timestamp. Server-wide snapshots capture all online players at once along with server metadata like world time and player count. Old snapshots are automatically pruned based on limits you configure, so your disk never gets out of hand.
Admins have full control — they can manually create, delete, and load any snapshot at any time using simple commands. Players have limited but useful control over their own data, able to create and delete their own snapshots and toggle their own auto-saving.
? Anti-Abuse by Design
Members cannot use /data load — this is intentional. Allowing players to restore their own data on demand would open the door to item duplication exploits. For example, a player could drop Netherite gear on the ground, load an old snapshot to get it back in their inventory, then pick up the gear they dropped — duplicating it for free. Only server staff with the dataguard.admin permission can restore data.
? Commands
Admin / OP
/data server create [label] — Take a full server snapshot
/data server delete <label> — Delete a server snapshot
/data server automatic <true/false> — Toggle server-wide auto-saving
/data player create [player] [label] — Snapshot a specific player
/data player delete <player> <label> — Delete a player's snapshot
/data load player <player> <snapshot> — Restore a player's data
/data load server <snapshot> — Restore all online players from a server snapshot
/data list server — View all server snapshots
/data reload — Reload the config live
Members
/data player create [label] — Save your own data manually
/data player delete <label> — Delete one of your own snapshots
/data automatic <true/false> — Toggle your personal auto-saving
/data list player — View your own snapshots
? Configuration
Everything is tunable in config.yml:
- Auto-save interval (default: 30 minutes)
- Max snapshots per player before old ones are pruned
- Max server snapshots to keep
- All plugin messages and the chat prefix
? Requirements
- Server: PaperMC 1.21.11
- Java: 21+
- No dependencies, no external plugins required.
评论 0
登录后参与评分
还没有评论,来抢沙发吧