EventAntiXray
EventAntiXray 是一款轻量级的纯观察型 Fabric 模组,专为希望在不影响服务器性能或游戏体验的前提下检测潜在 X-ray 作弊行为的服务器管理员设计。它能智能追踪玩家对有价值方块的破坏活动,并在检测到可疑模式时 discreetly(谨慎地)向工作人员发出警报,同时支持 Discord 集成。
依赖项
功能
- 观察式检测:监控方块破坏行为且不干扰游戏玩法。它从不取消操作、发送数据包或影响方块可见性,确保对玩家零影响。
- 时间窗口分析:通过追踪玩家在可配置的时间段内(例如 30 分钟内挖掘 10 个钻石)挖掘了多少有价值的方块来检测可疑活动。
- 渐进式警报:发送初始警报,然后持续追踪可疑活动,如果行为持续,会发送带有特殊前缀的后续警报。
- Discord Webhook 集成:当触发警报时,将详细且可自定义的嵌入消息发送到 Discord 频道,包括检测时玩家的物品栏内容。针对持续活动的警报会智能更新原始的 Discord 消息。
- 玩家放置方块追踪:提供可选的 MySQL 数据库集成,用于追踪玩家放置的方块,有效消除因玩家挖掘自己放置的矿石而导致的误报。
- 高度可配置:您可以自定义从每个方块的阈值和时间窗口到游戏内警报消息和声音的所有内容。
- 性能优先:构建得极其轻量。它对服务器 TPS 没有任何影响,并使用高效的数据结构以最小化内存使用,Webhook 操作采用非阻塞方式。
命令
主要命令为 /antixray,别名为 /eax。
| 命令 |
权限 |
描述 |
/antixray reload |
antixray.reload |
从磁盘重新加载 config.json 文件,立即应用任何更改。 |
配置
EventAntiXray 使用位于 config/eventantixray/config.json 的单个文档完善的配置文件。该文件分为清晰的各个部分,便于管理。
tracked_blocks - 检测的核心
这是一个列表,您可以在其中定义要监视的每一个方块。每个条目都有几个关键选项:
| 设置项 |
描述 |
block_id |
方块的 Minecraft ID(例如 "minecraft:diamond_ore")。 |
alert_threshold |
在 time_window_minutes 内,玩家需要破坏多少个方块才能触发 首次 警报。 |
time_window_minutes |
模组将在玩家的挖掘历史中回溯多长时间(以分钟为单位)来统计方块数量。 |
subsequent_alert_threshold |
首次警报后,玩家需要再破坏多少个 额外 方块才能触发后续的“持续”警报。 |
reset_after_minutes |
玩家停止挖掘此特定方块多少分钟后,对该玩家的追踪将自动重置。设置为 0 表示永不重置。 |
alert_message |
发送给工作人员的自定义 MiniMessage 格式消息。支持占位符如 {player}、{count}、{block} 以及坐标。 |
alerts - 自定义工作人员通知
此部分控制如何在游戏内通知工作人员。
sound:配置警报时对工作人员播放的声音的 sound_id、volume(音量)和 pitch(音调)。您甚至可以设置乘数,使每次后续警报的声音更大或音调更高。
continued_alert_prefix:添加到持续可疑活动警报上的 MiniMessage 格式前缀(例如 "<red>[Continued]</red> ")。
webhook - Discord 集成
将模组连接到您的 Discord 服务器以进行远程监控。
enabled:一个简单的 true/false 开关,用于开启 webhook 通知。
url:您的 Discord webhook 的完整 URL。警报将作为详细的嵌入消息发送至此。
database - 防止误报
此部分用于配置可选的 MySQL 数据库,以追踪玩家放置的方块。
enabled:如果为 true,模组将连接到您的 MySQL 数据库以记录并检查玩家放置的方块。当玩家破坏一个方块时,模组会首先检查数据库。如果该方块是由玩家放置的,它将被忽略,不计入 X-ray 检测,从而防止误报。
- 连接详情:配置文件中提供了您的数据库
address(地址)、databasename(数据库名)、username(用户名)和 password(密码)字段,以及其他标准的连接选项。
EventAntiXray
EventAntiXray is a lightweight, purely observational Fabric mod for server administrators who want to detect potential X-ray cheating without impacting server performance or gameplay. It intelligently tracks player mining activity for valuable blocks and discreetly alerts staff when it detects suspicious patterns, complete with Discord integration.
Dependencies
Features
- Observational Detection: Monitors block breaks without interfering with gameplay. It never cancels actions, sends packets, or affects block visibility, ensuring zero impact on players.
- Time-Window Analysis: Detects suspicious activity by tracking how many valuable blocks a player mines within a configurable time period (e.g., 10 diamonds in 30 minutes).
- Progressive Alerts: Sends an initial alert and then tracks continued suspicious activity, sending follow-up alerts with a special prefix if the behavior persists.
- Discord Webhook Integration: Sends detailed, customizable embed messages to a Discord channel when an alert is triggered, including the player's inventory at the time of detection. Alerts for continued activity will smartly update the original Discord message.
- Player-Placed Block Tracking: Features an optional MySQL database integration to track blocks placed by players, effectively eliminating false positives from players mining their own placed ores.
- Highly Configurable: Customize everything from thresholds and time windows on a per-block basis to the in-game alert messages and sounds.
- Performance First: Built to be extremely lightweight. It has zero impact on server TPS and uses efficient data structures to minimize memory usage, with non-blocking operations for webhooks.
Commands
The primary command is /antixray, with the alias /eax.
| Command |
Permission |
Description |
/antixray reload |
antixray.reload |
Reloads the config.json file from disk, applying any changes immediately. |
Configuration
EventAntiXray uses a single, well-documented configuration file located at config/eventantixray/config.json. This file is broken down into clear sections for easy management.
tracked_blocks - The Core of Detection
This is a list where you define every block you want to monitor. Each entry has several key options:
| Setting |
Description |
block_id |
The Minecraft ID for the block (e.g., "minecraft:diamond_ore"). |
alert_threshold |
The number of blocks a player must break within the time_window_minutes to trigger the first alert. |
time_window_minutes |
The duration (in minutes) that the mod will look back in a player's mining history to count blocks. |
subsequent_alert_threshold |
After the first alert, this is the number of additional blocks the player must break to trigger a follow-up "Continued" alert. |
reset_after_minutes |
The number of minutes of inactivity (mining this specific block) after which the tracking for a player will automatically reset. Set to 0 to never reset. |
alert_message |
The customizable, MiniMessage-formatted message sent to staff. Supports placeholders like {player}, {count}, {block}, and coordinates. |
alerts - Customizing Staff Notifications
This section controls how staff are notified in-game.
sound: Configure the sound_id, volume, and pitch of the sound played to staff on an alert. You can even set multipliers to make the sound louder or higher-pitched for each subsequent alert.
continued_alert_prefix: A MiniMessage-formatted prefix added to alerts for ongoing suspicious activity (e.g., "<red>[Continued]</red> ").
webhook - Discord Integration
Connect the mod to your Discord server for remote monitoring.
enabled: A simple true/false toggle to turn on webhook notifications.
url: The full URL of your Discord webhook. Alerts will be sent here as detailed embed messages.
database - Preventing False Positives
This section is for configuring the optional MySQL database to track player-placed blocks.
enabled: If true, the mod will connect to your MySQL database to log and check against blocks placed by players. When a player breaks a block, the mod will first check the database. If the block was player-placed, it will be ignored for X-ray detection, preventing false alerts.
- Connection Details: The config provides fields for your database
address, databasename, username, and password, along with other standard connection options.
评论 0
登录后参与评分
还没有评论,来抢沙发吧