? ChestLogger
高性能、零阻塞的容器审计、回滚、物品溯源与智能防盗系统
面向 Minecraft 26.2(纯 Java 25)的双原生服务端版本:Fabric 模组与 Paper 插件。
✨ 概览
ChestLogger 是一款从底层构建的超高速、无卡顿的反破坏系统、智能防盗检测引擎及物品保管追踪器,专为现代 Minecraft 服务器设计。
与传统依赖 SQL 且会触发服务器 Tick 延迟和数据库锁的日志记录器不同,ChestLogger 将容器事件拦截至无锁内存环形缓冲区,并使用纯 LZ4 压缩将其流式写入仅追加的二进制文件(.clog)。
| 功能 |
? ChestLogger (Fabric & Paper) |
? 传统 SQL 日志记录器 |
| 服务器 Tick 影响 |
0.00 ms(无锁 MPSC 环形缓冲区) |
1.5 – 15.0 ms(JDBC 连接池争用) |
| 存储引擎 |
仅追加二进制格式 (.clog LZ4,<30 字节/事务) |
重型 SQLite / MySQL 表(每 10 万事务占用 25–45 MB) |
| 崩溃安全性 |
自愈式 CRC32 尾部检查点 |
SIGKILL / 崩溃时的数据库锁损坏 |
| 智能防盗引擎 |
亚 20ms 掠夺速度与距离启发式算法 |
任何容器接触即发送警报垃圾信息 |
| 物品保管追踪 |
完整 DAG 溯源树 (/chestlog trace) |
无(扁平化表格,缺乏保管关联) |
| 回滚安全性 |
非破坏性槽位补偿 |
硬快照(会删除较新的合法物品) |
| 低端 HDD 优化 |
顺序批量写入(零寻道风暴) |
预算主机上的随机磁盘 I/O 抖动 |
? 主要特性
?️ 智能防盗与掠夺检测引擎
- 上下文感知存在检测: 在亚 20ms 内区分合法的协作团队行为与恶意破坏。可检测 ? 离线盗窃、? 主人缺席的掠夺,并在 ? 同意 proximity(主人附近)期间抑制警报。
- 滑动窗口掠夺速度追踪: 在 300 秒窗口内检测跨越不同坐标的快速多箱掠夺爆发,并立即触发
CRITICAL_RAID 警报。
- 方向性玩家信任系统: 玩家可使用
/chestlog trust <player> 信任队友,使其免于警报。
- 自然荒野分类: 世界生成的容器(地牢、矿井、沉船)默认为
UNCLAIMED_NATURAL,以防止在探索时产生误报垃圾信息。
? 容器认领与防狙击保护
- 自动放置认领: 当你放置容器时,它们会自动以你的名字进行认领。
- 单个与批量认领: 使用
/chestlog claim 安全认领未拥有的容器,或使用 /chestlog claim [radius] 批量认领整个区域(玩家最大 16 格,管理员最大 32 格)。
- 防狙击防御: 如果最近的审计历史证明该容器之前由他人拥有,则防止破坏者进行认领。
- 认领转移: 使用
/chestlog transfer <newOwner> 安全转移容器所有权。
? 物品溯源与保管链 (/chestlog trace)
- 追踪物品生命周期: 重建你主手所持物品(
/chestlog trace)或任何容器槽位中物品(/chestlog trace <X> <Y> <Z> [slot])的完整保管旅程。
- 循环安全的 DAG 遍历: 跟随物品通过玩家交易、箱子存入、取出以及漏斗自动化路线。
- 64 位组件指纹识别: 准确追踪自定义附魔、重命名或修改过的物品。
?️ 游戏内图形菜单与模组菜单
- 点击检查模式 (
/chestlog i): 左击任意容器可在聊天栏查看日志,或右击打开完整的 54 槽交互式可视化历史记录菜单(Paper 和 Fabric 均支持)。
- 游戏内配置界面 (
/chestlog config): 在交互式 GUI 中调整警报冷却时间、主人邻近距离和 Web 端口,支持 实时热重载(无需重启服务器)。
- 模组菜单支持 (Fabric 客户端): 直接从暂停屏幕访问配置界面:游戏菜单 ➔ 模组 ➔ ChestLogger ➔ 配置。
⏪ 安全的非破坏性回滚
- 两阶段确认令牌系统: 运行
/chestlog rollback 会在内存中计算逆向槽位增量计划,并在应用任何世界更改前提供临时安全令牌。
- 零覆盖保护: 合并到现有的部分堆叠中并将物品移至空槽。如果容器已满(100%),它将标记冲突而不是删除较新的合法物品。
- 双箱(54 槽)一致性: 对链接的双箱及其两侧以及自动化漏斗进行完整的双坐标追踪。
- 自适应半箱恢复: 如果破坏者打破了双箱的一半,物品将被自适应恢复到幸存的单箱中的可用槽位。
? 多渠道警报与 Discord Webhook
- 游戏内员工 HUD: 实时的动作条警告和带有可点击
[Teleport](传送)和 [Inspect](检查)按钮的交互式聊天警报卡片。
- Discord 安全 Webhook: 异步警报发送详细的丰富嵌入内容,包括事件类型、坐标、被盗物品以及玩家存在状态。
? 内置 Web 仪表板与 REST API
- 零依赖嵌入式 Web 服务器,运行于端口
8080(或主机分配的端口)。
- 实时事件遥测数据流、可过滤的日志浏览器以及可视化的 SVG 物品保管旅程图。
- 直接将过滤后的容器审计轨迹导出为 RFC 4180 CSV 电子表格或原始 JSON。
? 命令摘要
? 别名为 /cl 或 /chestlog。
?️ 适用于所有玩家(无需 OP 权限)
/chestlog help — 交互式、按权限过滤的命令目录
/chestlog i — 切换点击检查模式(左键点击聊天窗口,右键点击 GUI)
/chestlog claim [radius] — 认领目标容器(或批量认领最多 16 格半径的区域)
/chestlog transfer <player> — 将你的容器所有权转移给另一位玩家
/chestlog unclaim — 解除对目标容器的所有权认领
/chestlog trust <player> — 信任一名队友,使其可以共享容器而不会触发警报
/chestlog untrust <player> | /chestlog trustlist — 管理你信任的队友列表
/chestlog trace — 重建主手所持物品的保管历史
?️ 适用于工作人员与管理员
/chestlog inspect <X> <Y> <Z> [page] — 检查分页的容器历史记录
/chestlog inspect <X> <Y> <Z> <player> [page] — 按玩家筛选容器历史记录
/chestlog wand — 查看权杖信息并快速使用说明
/chestlog trace <X> <Y> <Z> [slot] — 追踪容器槽位中物品的保管历史(0–53)
/chestlog rollback <X> <Y> <Z> <seconds> [player] — 预览回滚补偿方案
/chestlog rollback <X> <Y> <Z> <sec> confirm <token> — 执行实时回滚
/chestlog stats — 实时内存队列深度、吞吐量及索引遥测数据
/chestlog config — 打开交互式游戏内配置 GUI
/chestlog purge <days> [token] — 两步安全清理旧日志段
/chestlog web [start|stop] — (Paper) 启动/停止嵌入式 Web 仪表盘
? 安装与要求
Fabric 模组(服务器与客户端)
- 下载
chestlogger-fabric-2.6.4.jar 并将其放入 mods/ 目录。
- 要求:
- Minecraft
26.2 (~26.2)
- Fabric Loader 0.19.3+
- Fabric API(必需)
- Java 25 (
>= 25)
- (可选) 安装 Mod Menu 以在游戏内配置设置。
Paper 插件(服务器)
- 下载
chestlogger-paper-2.6.4.jar 并将其放入 plugins/ 目录。
- 要求:
- Paper 26.2(或在 Java 25 上运行的现代 Paper 1.21.x)
- Java 25 (
>= 25)
- 重启你的服务器(无需外部库依赖)。
? 链接与文档
? ChestLogger
High-Performance, Zero-Blocking Container Audit, Rollback, Item Provenance & Smart Theft Detection System
Dual Native Server Releases for Fabric Mod & Paper Plugin on Minecraft 26.2 (Pure Java 25).
✨ Overview
ChestLogger is an ultra-fast, zero-lag anti-griefing system, smart theft detection engine, and item custody tracker built from first principles for modern Minecraft servers.
Unlike traditional SQL-heavy loggers that trigger server tick lag and database locks, ChestLogger intercepts container events into a lock-free memory ring buffer and streams them to append-only binary files (.clog) using pure LZ4 compression.
| Feature |
? ChestLogger (Fabric & Paper) |
? Traditional SQL Loggers |
| Server Tick Impact |
0.00 ms (Lock-Free MPSC Ring Buffer) |
1.5 – 15.0 ms (JDBC connection pool contention) |
| Storage Engine |
Append-Only Binary (.clog LZ4, <30 bytes/tx) |
Heavy SQLite / MySQL tables (25–45 MB/100k tx) |
| Crash Safety |
Self-Healing CRC32 Tail Checkpoints |
Database lock corruptions on SIGKILL / crash |
| Smart Theft Engine |
Sub-20ms Raid Velocity & Distance Heuristics |
Alert spam on any container touch |
| Item Custody Tracing |
Full DAG Provenance Tree (/chestlog trace) |
None (Flat tables without custody linkage) |
| Rollback Safety |
Non-Destructive Slot Compensation |
Hard snapshots (deletes newer legitimate items) |
| Low-End HDD Tuned |
Sequential Batched Writes (Zero seek storms) |
Random disk I/O thrashing on budget hosts |
? Key Features
?️ Smart Theft & Raid Detection Engine
- Context-Aware Presence Detection: Distinguishes legitimate cooperative teamwork from griefing in sub-20ms. Detects ? Offline Theft, ? Absent Owner Looting, and suppresses alerts during ? Consensual Proximity (owner nearby).
- Sliding-Window Raid Velocity Tracking: Detects rapid multi-chest looting bursts across distinct coordinates within a 300s window, raising instant
CRITICAL_RAID alerts.
- Directional Player Trust System: Players can trust teammates with
/chestlog trust <player> to exempt them from alarms.
- Natural Wilderness Classification: World-gen containers (dungeons, mineshafts, shipwrecks) default to
UNCLAIMED_NATURAL to prevent false alert spam while exploring.
? Container Claiming & Anti-Sniping Protection
- Automatic Placement Claims: Containers are claimed under your name the moment you place them down.
- Single & Mass Claiming: Secure unowned containers with
/chestlog claim or batch-claim an entire area with /chestlog claim [radius] (up to 16 blocks for players, 32 for admins).
- Anti-Sniping Defense: Prevents griefers from claiming chests if recent audit history proves prior ownership by someone else.
- Claim Transfers: Safely transfer container ownership with
/chestlog transfer <newOwner>.
? Item Provenance & Chain of Custody (/chestlog trace)
- Trace Item Lifecycles: Reconstruct the complete custody journey of the item held in your main hand (
/chestlog trace) or at any container slot (/chestlog trace <X> <Y> <Z> [slot]).
- Cycle-Safe DAG Traversal: Follows items through player trades, chest deposits, withdrawals, and hopper automation routes.
- 64-Bit Component Fingerprinting: Accurately follows custom-enchanted, renamed, or modified items.
?️ In-Game Graphical Menus & Mod Menu
- Click-to-Inspect Mode (
/chestlog i): Left-click any container to view logs in chat, or right-click to open the full 54-slot interactive visual history menu (available on both Paper and Fabric).
- In-Game Configuration Screen (
/chestlog config): Adjust alert cooldowns, owner proximity distances, and web ports inside an interactive GUI with live hot-reloading (zero server restarts required).
- Mod Menu Support (Fabric Client): Access the configuration screen directly from the pause screen: Game Menu ➔ Mods ➔ ChestLogger ➔ Configure.
⏪ Safe Non-Destructive Rollbacks
- Two-Stage Confirmation Token System: Running
/chestlog rollback calculates an inverse slot delta plan in memory and provides a temporary safety token before applying any world changes.
- Zero-Overwrite Protection: Merges into existing partial stacks and relocates items to empty slots. If a container is 100% full, it flags a conflict rather than deleting newer legitimate items.
- Double Chest (54-Slot) Parity: Full dual-coordinate tracking across both halves of linked double chests and automated hoppers.
- Adaptive Broken-Half Recovery: If a griefer breaks one half of a double chest, items are adaptively restored into available slots of the surviving single chest.
? Multi-Channel Alerting & Discord Webhooks
- In-Game Staff HUD: Real-time Action-Bar warnings and interactive chat alert cards with clickable
[Teleport] and [Inspect] buttons.
- Discord Security Webhooks: Asynchronous alerts sending rich embeds detailing the incident type, coordinates, items taken, and player presence states.
? Built-In Web Dashboard & REST API
- Zero-dependency embedded web server running on port
8080 (or host-allocated port).
- Live incident telemetry feed, filterable log explorer, and visual SVG item custody journey visualizer.
- Export filtered container audit trails directly to RFC 4180 CSV spreadsheets or raw JSON.
? Commands Summary
? Aliased as /cl or /chestlog.
?️ For All Players (No OP Required)
/chestlog help — Interactive, permission-filtered command directory
/chestlog i — Toggle click inspection mode (Left-click chat, Right-click GUI)
/chestlog claim [radius] — Claim targeted container (or mass-claim area up to 16 blocks)
/chestlog transfer <player> — Transfer ownership of your container to another player
/chestlog unclaim — Release ownership claim from targeted container
/chestlog trust <player> — Trust a teammate to share containers without alerts
/chestlog untrust <player> | /chestlog trustlist — Manage your trusted teammates
/chestlog trace — Reconstruct custody history for the item held in your main hand
?️ For Staff & Administrators
/chestlog inspect <X> <Y> <Z> [page] — Inspect paginated container history
/chestlog inspect <X> <Y> <Z> <player> [page] — Filter container history by player
/chestlog wand — Inspect wand information and quick usage instructions
/chestlog trace <X> <Y> <Z> [slot] — Trace custody history for item in container slot (0–53)
/chestlog rollback <X> <Y> <Z> <seconds> [player] — Preview rollback compensation plan
/chestlog rollback <X> <Y> <Z> <sec> confirm <token> — Execute live rollback
/chestlog stats — Real-time memory queue depth, throughput, and index telemetry
/chestlog config — Open interactive In-Game Configuration GUI
/chestlog purge <days> [token] — Two-step safe purge of old log segments
/chestlog web [start|stop] — (Paper) Start/stop embedded Web Dashboard
? Installation & Requirements
Fabric Mod (Server & Client)
- Download
chestlogger-fabric-2.6.4.jar and place it into your mods/ directory.
- Requirements:
- Minecraft
26.2 (~26.2)
- Fabric Loader 0.19.3+
- Fabric API (Required)
- Java 25 (
>= 25)
- (Optional) Install Mod Menu to configure settings in-game.
Paper Plugin (Server)
- Download
chestlogger-paper-2.6.4.jar and place it into your plugins/ directory.
- Requirements:
- Paper 26.2 (or modern Paper 1.21.x running on Java 25)
- Java 25 (
>= 25)
- Restart your server (Zero external library dependencies required).
? Links & Documentation
评论 0
登录后参与评分
还没有评论,来抢沙发吧