OxAntiCheat
OxAntiCheat 是一款面向 Paper 服务器的基于数据包感知的反作弊插件,侧重于在标记玩家之前收集多项证据,而非对单一可疑动作或数据包做出反应。它结合 PacketEvents 的数据与正常的服务端信息,来分析移动、战斗、方块交互、物品栏操作及其他玩家行为。
该系统采用保守策略,通过置信度阈值、连续样本数、违规等级、宽限期以及延迟补偿机制来防止误报,避免惩罚每一个不寻常的动作。
核心功能
OxAntiCheat 通过专门的检测模块,在所有主要游戏向量方面提供全面的保护:
- 移动检测: 速度、飞行、地面伪装、穿墙、无坠落、旋转和速度异常。移动数据包会被转换为包含位置、旋转、地面状态和其他上下文的快照,供引擎使用。检测要求出现多次连续的异常样本才会产生违规记录。
- 战斗检测: 距离分析、边界框射线检测、自瞄模式分析、点击模式分析、速度分析和战斗状态追踪。距离检测利用玩家的视线位置、方向和目标边界框来估算攻击的有效性。使用行为统计数据,而非依赖单个 tick。
- 方块检测: 搭路(Scaffold)、炸矿(Nuker)、快速破坏(FastBreak)和快速放置(FastPlace)。快速破坏会评估方块硬度、工具、活跃效果和服务端配置以估算合理的破坏时间。炸矿会跟踪随时间的活动情况,而搭路则检查放置和移动模式。
- 物品栏与聊天检测: 跟踪物品栏操作以标记异常高的交互频率(可针对自定义物品栏系统进行配置),并在可配置的窗口期内监控聊天消息以防止垃圾信息刷屏。
- PacketEvents 集成: 需要 PacketEvents(版本 2.13.0+)作为外部依赖项来处理数据包级别的移动和交互数据。
- 延迟补偿: 在高延迟、高抖动、传送、重生、击退、加入服务器或切换世界期间暂时抑制检测,以防止对正常玩家产生误报。
- 安全回退: 在验证了世界一致性、距离阈值、玩家碰撞空间、头部空间和地面安全性后,将标记的玩家重新定位到已验证的安全位置。可在配置中完全禁用此功能。
- 基于置信度的检测: 使用置信度阈值、违规等级、连续样本要求、重复标记抑制和违规衰减机制,使服务器管理员可以微调检测的激进程度。
- 世界配置文件与 Geyser 支持: 包含预配置的配置文件(
default、practice、bedwars、survival),可根据世界类型调整乘数。内置了对 Bedrock/Geyser 玩家的检测(Geyser 和 Floodgate 为可选依赖项)。
- 客户端检测与 SQLite 日志: 通过
/ac client <player> 识别被报告的客户端品牌,并将违规/处罚记录(UUID、名称、检测类型、置信度、时间戳、处罚详情)存储在 SQLite 数据库中,保留时间可配置。
- Discord 警报与处罚: 支持 Discord Webhook 进行实时警报。提供可配置的处罚措施,包括自动踢出、封禁、封禁波次(需满足置信度要求)和衰减规则。建议在新安装时暂时禁用自动处罚,直到经过充分测试。
配置与命令
管理和自定义插件设置、命令及权限,以适应您服务器的特定机制。
配置文件
OxAntiCheat 将其配置分离为独立的文件,以便在不编辑插件源代码的情况下调整阈值:
config.yml — 通用插件和线程设置。
checks.yml — 检测参数和检测灵敏度。
messages.yml — 自定义游戏内消息和警报。
discord.yml — Discord Webhook 通知。
lag.yml — 延迟、抖动和延迟补偿设置。
关键可配置方面包括分析线程、移动历史记录大小、检测置信度、连续样本数、回退规则、延迟补偿、数据库保留时间、处罚阈值、封禁波次、Geyser 支持和 Discord Webhooks。
主要命令
主命令:/anticheat(别名:/ac)
/ac status — 查看系统状态。
/ac stats — 显示总体检测统计信息。
/ac violations — 检查活跃的违规日志。
/ac debug — 切换或检查调试日志。
/ac reload — 重新加载配置文件。
/ac ban — 手动发布反作弊处罚。
/ac discord — 管理或测试 Discord 集成。
/ac client <player> — 检查检测到的客户端品牌信息。
权限
oxanticheat.admin — 旨在供管理员管理反作弊系统。
oxanticheat.bypass — 豁免受信任的玩家免受反作弊检测。
oxanticheat.debug — 授予访问调试功能的权限。
部署与要求
部署所需的系统要求、设置说明和技术设计备注。
系统要求
- Paper Server
- Java 21
- PacketEvents 2.13.0(必需的外部依赖项)
- Geyser / Floodgate(Bedrock 支持的可选依赖项)
安装步骤
- 在服务器上安装兼容版本的 PacketEvents。
- 将
OxAntiCheat.jar 放入服务器的 plugins 文件夹中。
- 启动服务器以生成配置文件。
- 审查并调整
config.yml、checks.yml 及其他设置。
- 在启用自动处罚之前,先在服务器上测试移动和战斗机制。
性能与项目备注
- 性能: 运动分析在安全的情况下会异步执行基于快照的检查。依赖 Bukkit 主线程 API 的检查则保留在服务端主线程中。线程数量、历史记录大小以及数据库操作均可完全自定义配置。
- 重要免责声明: 没有任何反作弊系统能够保证在所有环境中检测到每一种可能的作弊行为。自定义移动系统、独特属性、小游戏机制、击退调整以及服务器延迟都可能影响检测结果。请根据您特定的服务器环境调整世界配置文件和检测阈值。
- 项目状态与致谢: OxAntiCheat 是由 ItzRealOrionX 积极开发的一款反作弊框架。反馈、误报报告以及测试结果有助于随时间推移优化默认设置及各项独立检测规则。
致谢
由 ItzRealOrionX 用 ❤️ 开发。
OxAntiCheat
OxAntiCheat is a packet aware anti-cheat plugin for Paper servers, focused on collecting multiple pieces of evidence before flagging a player rather than reacting to a single suspicious movement or packet. It combines PacketEvents data with normal server side information to analyze movement, combat, block interactions, inventory actions, and other player behavior.
The system is designed to be conservative using confidence thresholds, consecutive samples, violation levels, grace periods, and lag compensation to prevent unnecessary flags and avoid punishing every unusual action.
Core Features
OxAntiCheat provides comprehensive protection across all primary gameplay vectors through specialized detection modules:
- Movement Checks: Speed, flight, ground spoofing, phase, NoFall, rotation, and velocity. Movement packets are converted into snapshots containing position, rotation, ground state, and other context used by the engine. Checks can require multiple consecutive suspicious samples before producing a violation.
- Combat Checks: Reach analysis, bounding-box ray checks, aimbot pattern analysis, click-pattern analysis, velocity analysis, and combat state tracking. Reach detection uses the player's eye position, direction, and target bounding box to estimate attack validity. Behavioral statistics are used instead of relying on single ticks.
- Block Checks: Scaffold, Nuker, FastBreak, and FastPlace. FastBreak evaluates block hardness, tools, active effects, and server configuration to estimate reasonable breaking times. Nuker tracks activity over time, while Scaffold checks placement and movement patterns.
- Inventory & Chat Checks: Tracks inventory actions to flag unusually high interaction rates (configurable for custom inventory systems) and monitors chat messages over configurable windows to stop spam.
- PacketEvents Integration: Requires PacketEvents (version 2.13.0+) as an external dependency to handle packet-level movement and interaction data.
- Lag Compensation: Suppresses checks temporarily during high ping, high jitter, teleports, respawns, knockback, server joins, or world changes to prevent false positives on legitimate players.
- Safe Setbacks: Relocates flagged players back to a verified safe position after validating world consistency, distance thresholds, player collision space, headroom, and floor safety. Can be fully disabled in the configuration.
- Confidence-Based Detection: Uses confidence thresholds, violation levels, consecutive sample requirements, duplicate flag suppression, and violation decay so server owners can fine-tune aggressiveness.
- World Profiles & Geyser Support: Includes pre-configured profiles (
default, practice, bedwars, survival) adjusting multipliers per world type. Native detection for Bedrock/Geyser players is built-in (Geyser and Floodgate are optional dependencies).
- Client Detection & SQLite Logging: Identifies reported client brands via
/ac client <player> and stores violations/punishment records (UUID, name, detection type, confidence, timestamps, punishment details) in SQLite with configurable retention.
- Discord Alerts & Punishments: Supports Discord webhooks for real-time alerts. Offers configurable punishments including automatic kicks, bans, ban waves (with confidence requirements), and decay rules. It is recommended to keep automatic punishments disabled on new installations until thoroughly tested.
Configuration & Commands
Manage and customize the plugin settings, commands, and permissions to fit your server's specific mechanics.
Configuration Files
OxAntiCheat separates its configuration into distinct files so thresholds can be adjusted without editing plugin source code:
config.yml — General plugin and thread settings.
checks.yml — Detection parameters and check sensitivities.
messages.yml — Custom in-game messages and alerts.
discord.yml — Discord webhook notifications.
lag.yml — Ping, jitter, and lag compensation settings.
Key configurable aspects include analysis threads, movement history size, check confidence, consecutive samples, setback rules, lag compensation, database retention, punishment thresholds, ban waves, Geyser support, and Discord webhooks.
Main Commands
Main command: /anticheat (Alias: /ac)
/ac status — View system status.
/ac stats — Display overall detection statistics.
/ac violations — Inspect active violation logs.
/ac debug — Toggle or inspect debug logging.
/ac reload — Reload configuration files.
/ac ban — Issue anti-cheat punishments manually.
/ac discord — Manage or test Discord integration.
/ac client <player> — Inspect detected client brand information.
Permissions
oxanticheat.admin — Intended for administrators to manage the anti-cheat.
oxanticheat.bypass — Exempts trusted players from anti-cheat checks.
oxanticheat.debug — Grants access to debugging functionality.
Deployment & Requirements
System requirements, setup instructions, and technical design notes for deployment.
System Requirements
- Paper Server
- Java 21
- PacketEvents 2.13.0 (Required external dependency)
- Geyser / Floodgate (Optional dependencies for Bedrock support)
Installation Steps
- Install a compatible PacketEvents version on your server.
- Place
OxAntiCheat.jar into your server's plugins folder.
- Start the server to generate configuration files.
- Review and adjust
config.yml, checks.yml, and other settings.
- Test movement and combat mechanics on your server prior to enabling automatic punishments.
Performance & Project Notes
- Performance: Movement analysis processes snapshot-based checks asynchronously where safe to do so. Checks relying on Bukkit's main-thread API are kept on the server thread. Thread count, history sizes, and database operations are fully configurable.
- Important Disclaimer: No anti-cheat can guarantee detection of every possible cheat in every environment. Custom movement systems, unique attributes, minigame mechanics, knockback adjustments, and server lag can impact results. Tune world profiles and check thresholds to match your specific server environment.
- Project Status & Credits: OxAntiCheat is an actively developed anti-cheat framework created by ItzRealOrionX. Feedback, false-positive reports, and testing results help improve defaults and individual checks over time.
Credits
Developed with ❤️ by ItzRealOrionX.
评论 0
登录后参与评分
还没有评论,来抢沙发吧