
AquaGuard
面向模组服务器的服务端审计日志记录、调查与回滚工具。
AquaGuard 使用 SQLite 或 MySQL 记录服务器上的事件,且不会在主线程上进行数据库写入操作。管理员可以检查特定方块、追踪玩家行为、预览回滚效果,并通过游戏内命令恢复受损区域。
该模组专为模组服务器打造:方块实体、容器变更、NBT 数据、自动化实体以及其他模组报告的行为,均与原版事件共享同一份审计轨迹。
一个版本,三个加载器。 每个发行版均包含适用于 Minecraft 1.21.1 的 Fabric、NeoForge 和 Forge 构建包,它们源自同一源码并拥有相同的版本号。
功能特性
- 审计轨迹:涵盖方块破坏与放置、容器交互、告示牌、实体互动、死亡、登录与登出、爆炸,以及自然变化(如火焰蔓延、树叶腐烂、掉落方块)。
- 世界内检查:切换检查模式并点击方块,即可查看其带有时间戳、玩家、状态及存储详情的近期历史。
- 回滚与恢复:按玩家或区域预览并撤销更改;如有需要,可重新应用之前的回滚。回滚操作以较小的批次在服务器刻中运行,以避免卡顿。
- NBT 感知历史记录:保留容器内容物、告示牌文本、熔炉状态、物品组件及支持的方块实体数据。
- SQLite 或 MySQL/MariaDB:SQLite 无需额外配置即可使用。MySQL 或 MariaDB 允许多个服务器共享同一个数据库。
- 异步管道:写入操作通过有界队列和专用的数据库线程批量进行。查询操作则在独立的 worker 线程上运行。
- 运维工具:Discord grief 警报、自动清理、用于 Moderation 证据的 CSV 导出,以及数据库健康检查。
- 开发者 API:其他模组可通过
AquaGuardAPI 记录自身带有归属的操作。
聊天、指令以及物品拾取/丢弃的日志记录已在计划中。
命令
所有命令均以 /ag 开头,并使用原版操作员权限等级。
| 命令 |
用途 |
/ag inspect (/ag i) |
切换方块检查模式 |
/ag area ... |
获取选择棒并设置区域角点 |
/ag lookup ... (/ag l) |
按玩家、半径、位置、动作或页码搜索 |
/ag rollback ... |
预览或撤销已记录的更改 |
/ag restore ... |
重新应用之前回滚的更改 |
/ag status |
显示日志数量、数据库状态及活动设置 |
/ag export ... |
将玩家的历史记录导出为 CSV 文件 |
/ag prune <time> |
永久删除早于指定时间的历史记录 |
Inspect、lookup、status 和 area 命令需要权限等级 2。Rollback、restore、prune 和 export 命令需要权限等级 3。
完整的语法和示例请参阅 命令参考。
安装
- 下载对应加载器的文件:
aquaguard-fabric-<version>.jar、aquaguard-neoforge-<version>.jar 或 aquaguard-forge-<version>.jar。
- 对于 Fabric,还需安装 Fabric API。NeoForge 和 Forge 无需其他模组支持。
- 将 jar 文件放入服务器的
mods/ 文件夹,并启动服务器一次。
- 查看
config/aquaguard/aquaguard-common.toml,修改后重启服务器。
AquaGuard 仅在服务端运行。玩家客户端无需安装。它同样适用于单人游戏和局域网世界。
| 加载器 |
Minecraft |
最低加载器版本 |
| Fabric |
1.21.1 |
Fabric Loader 0.16.9, Fabric API |
| NeoForge |
1.21.1 |
NeoForge 21.1.93 |
| Forge |
1.21.1 |
Forge 52.0.16 |
配置
每个日志类别均可单独关闭。数据库、维护、警报和遥测设置各有其独立部分。在启用 MySQL 或 Discord 警报之前,请阅读 配置指南。
遥测功能默认处于关闭状态。除非服务器所有者启用并设置了端点,否则不会发送任何数据。它从不包含玩家名称、UUID、聊天内容或坐标信息。
链接
AquaGuard 基于 MIT 许可证发布。

AquaGuard
Server-side audit logging, investigation, and rollback for modded Minecraft servers.
AquaGuard records what happens on your server in SQLite or MySQL without running database writes on the server thread. Moderators can inspect a block, trace a player's actions, preview a rollback, and restore damaged areas with in-game commands.
It is built for modded servers: block entities, container changes, NBT, automated actors, and actions reported by other mods share one audit trail with vanilla events.
One version, three loaders. Every release ships Fabric, NeoForge, and Forge builds for Minecraft 1.21.1, built from the same source with the same version number.
Features
- Audit trail: block breaks and placements, containers, signs, entity interactions, deaths, logins and logouts, explosions, and natural changes such as fire spread, leaf decay, and falling blocks.
- In-world inspection: toggle inspect mode and click a block to see its recent history with timestamps, players, states, and stored details.
- Rollback and restore: preview and reverse changes by player or area, then re-apply a rollback if needed. Rollbacks run in small batches on the server tick to avoid lag spikes.
- NBT-aware history: keeps container contents, sign text, furnace state, item components, and supported block-entity data.
- SQLite or MySQL/MariaDB: SQLite works with no setup. MySQL or MariaDB lets several servers share one database.
- Asynchronous pipeline: writes go through a bounded queue and a dedicated database thread in batches. Lookups run on separate worker threads.
- Operations tools: Discord grief alerts, automatic pruning, CSV exports for moderation evidence, and a database health check.
- Developer API: other mods can log their own attributed actions through
AquaGuardAPI.
Chat, command, and item pickup/drop logging is planned.
Commands
All commands live under /ag and use vanilla operator levels.
| Command |
Purpose |
/ag inspect (/ag i) |
Toggle block inspection mode |
/ag area ... |
Get the selection wand and set area corners |
/ag lookup ... (/ag l) |
Search by player, radius, position, action, or page |
/ag rollback ... |
Preview or reverse recorded changes |
/ag restore ... |
Re-apply changes from a previous rollback |
/ag status |
Show log count, database state, and active settings |
/ag export ... |
Export a player's history to CSV |
/ag prune <time> |
Permanently delete history older than the given time |
Inspect, lookup, status, and area need permission level 2. Rollback, restore, prune, and export need level 3.
Full syntax and examples are in the command reference.
Installation
- Download the file for your loader:
aquaguard-fabric-<version>.jar, aquaguard-neoforge-<version>.jar, or aquaguard-forge-<version>.jar.
- On Fabric, also install Fabric API. NeoForge and Forge need no other mods.
- Put the jar in the server's
mods/ folder and start the server once.
- Review
config/aquaguard/aquaguard-common.toml and restart after changing it.
AquaGuard runs on the server only. Players do not need it on their clients. It also works in singleplayer and on LAN worlds.
| Loader |
Minecraft |
Minimum loader version |
| Fabric |
1.21.1 |
Fabric Loader 0.16.9, Fabric API |
| NeoForge |
1.21.1 |
NeoForge 21.1.93 |
| Forge |
1.21.1 |
Forge 52.0.16 |
Configuration
Every logging category can be turned off on its own. Database, maintenance, alert, and telemetry settings each have their own section. Read the configuration guide before enabling MySQL or Discord alerts.
Telemetry is off by default. Nothing is sent unless a server owner enables it and sets an endpoint. It never includes player names, UUIDs, chat, or coordinates.
Links
AquaGuard is released under the MIT License.
评论 0
登录后参与评分
还没有评论,来抢沙发吧