
[MAX] ML Anti XRay
Automatically flag potential xrayers with Machine Learning
- Загрузки
- 25K
- Подписчики
- 24
- Обновлён
- 29 января 2026 г.
- Лицензия
- Apache-2.0
Опубликован 13 марта 2025 г.
AI Anti-Xray Detection Plugin
This plugin is designed to help Minecraft server administrators detect and prevent x-ray cheating using a simple AI model. It monitors players' ore mining behavior and collects various data points to determine if a player is likely using x-ray mods.
Key Features
AI-Driven Detection:
The plugin uses two sets of model weights (for legit and x-ray behavior) to compute a confidence score indicating the likelihood that a player is x-raying.Comprehensive Data Collection:
- Distance Calculation: Tracks the distance from the last mined ore.
- Exposure Analysis: Determines whether an ore was naturally visible or revealed due to nearby block breaking.
- Ore Vein Grouping: Data is only recorded once per ore vein to avoid duplicate counts.
- Mining History: Maintains a rolling history of ore mining events (default: 10 minutes).
- Rotation from last ore: Checks how big of a rotation you'd have to do in order to reach an ore from the last one.
Dynamic Training System:
Use the/train <legit|xray>command to adjust the AI model weights based on player behavior. This allows the model to learn and improve over time:- Legit Training: Adjusts the model if a player is confidently a legitimate miner.
- Xray Training: Adjusts the model when a player is detected as using x-ray mods.
Customizable Configuration:
Configure the plugin viaconfig.ymlto set:- Flag threshold (confidence percentage).
- Flag messages.
- List of ores to monitor.
- Mining time window for data collection.
- And more...
Automatic File Management:
The plugin automatically creates necessary folders and files (e.g., ML/legit.dat, ML/xray.dat) if they do not exist, ensuring smooth first-time setup.
How It Works
Data Collection:
- When a player breaks a block, the plugin checks if it's an ore of interest.
- If a non-ore block is broken, the plugin scans adjacent blocks for ores and marks them as "revealed."
- When an ore is mined, the plugin checks if it was naturally exposed (i.e., visible without needing to break any adjacent block) before recording the event.
Feature Extraction:
The plugin calculates:- Player rotation difference to the ore.
- Distance from the previous ore break.
- Exposure status (using the revealed ore list).
- Count of similar ores mined within the configured time window.
AI Prediction:
The collected features are processed through a weighted model, and a confidence score is computed that indicates the likelihood of x-ray usage.Training & Adaptation:
The/traincommand allows administrators or trusted players to train the model based on observed behavior, updating the weights stored inML/legit.datorML/xray.dat.Flagging Suspicious Behavior:
If the confidence score exceeds the configured threshold, the plugin flags the player which then notifies staff of their potentially unfair behaviour.
Usage
Installation:
Place the plugin jar into your server'spluginsfolder. On first run, the necessary configuration and ML data files will be created automatically.Configuration:
Editconfig.ymlin the plugin’s data folder to customize the detection thresholds, messages, and ore list.Commands:
/train <legit|xray>
Use this command to train the AI model based on a player's recent mining behavior.
Conclusion
This AI Anti-Xray Detection Plugin leverages in-game data to help maintain a fair play environment on your server by dynamically learning and adapting to player behavior. Enjoy a smarter, self-improving system for combatting x-ray cheats!
Feel free to reach out with feedback or suggestions to improve the plugin further. Happy mining!
Ченджлог
R3HFРелиз1.21.9, 1.21.10, 1.21.11 · 29 января 2026 г.
Fixed a vulnerability and removed the version of the plugin on the modrinth page which contains it. It is critical you update to this version.
Audit logs
Log player infractions with configurable limits on the amount of player infractions to save at a time, and how many of their infractions to save, this ensures admins know that a player has been likely xraying and lets them teleport to where that infraction happened without bloating storage space.

Checking for updates
Plugin will now automatically warn you when updates are available so you never fail to have the newest protections against xray!
R2Релиз1.21.9, 1.21.10, 1.21.11 · 20 декабря 2025 г.
HUGE UPDATE
Refined config naming
Fixed the awful naming of only-count-unexposed-ores to a much more understandable exposed-ores-counted
Refined exposed ore logic
It used to be that, if a block was broken near an ore which was already exposed, it would count that as an ore the player probably illegitimately uncovered! This caused many issues with the plugin's false positives and I'm happy to announce that this is now fixed!
Late to catch an xrayer? Don't worry!
If the plugin suspects someone it'll automatically allow you to teleport to the mine they were using in order to check whether it looked illegitmate or not. This is also logged in the console AND webhooks for easy catching!
New command
This new command is basically exclusive to the feature above, it allows you to quickly teleport to abusers via a teleport id. This teleport id is shown in console and webhooks.
Usage /xray teleport <id>
R1HFРелиз1.21.6, 1.21.7, 1.21.8 · 29 июля 2025 г.
Bug fixes relating to players changing dimensions
R1Релиз1.21.5, 1.21.6, 1.21.7 · 6 июля 2025 г.
- Added automatic punishment option
- Alongside with config settings to change it's threshold, command and whether it's enabled (by default it's not)
B3Бета1.21.2, 1.21.3, 1.21.4 · 20 марта 2025 г.
Fixed a weight being based off the wrong value (sorry this may break some ppls configs) and added a ML update system so we can improve detections for you (confirmed by you don't worry your config will never be overwritten without your permission)!
B2Бета1.21.2, 1.21.3, 1.21.4 · 19 марта 2025 г.
Logs xray alerts in console now and fixed a bug where /xray reload didn't require any extra permissions so it is recommended to update to this version asap or it may allow players to lag the server slightly.
1Бета1.21.2, 1.21.3, 1.21.4 · 17 марта 2025 г.
BStats implementation + Discord webhooks
2Альфа1.21.2, 1.21.3, 1.21.4 · 15 марта 2025 г.
Now contains /xray <reload/alerts> to toggle alerts and reload the configuration. Also added to the detections with a new config data piece called "only-count-unexposed-ores" where the model will only care when you mine an ore that wasn't previously exposed which prevents some rare possible falses and is enabled by default.
Комментарии
Загружаем…