Understanding the Anti-Xray Plugin for Minecraft Servers
Every server administrator knows the frustration of players using X-ray hacks to gain an unfair advantage. These cheats allow users to see through blocks, pinpointing valuable ores like diamonds and ancient debris with ease. The Anti-Xray plugin provides a powerful solution by tracking ore mining patterns and alerting staff to suspicious activity. Instead of merely blocking the hack, it logs how many ores each player finds within a specific time span, making it easy to spot those who gather resources far too quickly.
What is Anti-Xray?
Anti-Xray is an intelligent X-ray detector designed for Minecraft servers. Rather than attempting to obfuscate blocks or modify the game’s rendering, it passively monitors how many ores a player uncovers. If someone collects an abnormal number of diamonds, emeralds, or other listed blocks in a short period, the plugin flags them. The system stores this data in a database, either SQLite or MySQL, and automatically purges old logs after a configurable number of days—365 by default. This keeps your storage manageable while preserving enough history to identify repeat offenders.
For servers already running CoreProtect, there is a special CoreProtect-Anti-Xray edition that uses the existing block logs to perform the same analysis, reducing overhead and integrating seamlessly with your current setup.
Key Features of Anti-Xray
- Tracks ore discovery rates per player over a customizable time window.
- Supports both SQLite and MySQL database storage for flexibility.
- Automatic log deletion after a set number of days, with an option to keep data forever.
- Integration with CoreProtect to leverage existing block logging.
- Simple command interface to check a player’s ore statistics.
- Anonymous usage metrics via mcstats.org, which can be disabled in the config.
How Anti-Xray Detects Cheaters
The plugin works by counting every instance of a tracked ore that a player mines. The percentage of ores found relative to total blocks broken is calculated only for the listed blocks, so normal stone mining doesn’t skew the results. A player using X-ray will typically have an unnaturally high ratio of diamonds to other blocks, and Anti-Xray makes that pattern obvious. Server moderators can then investigate and take action based on solid evidence rather than guesswork.
When CoreProtect is installed, the CoreProtect-Anti-Xray edition taps into the existing log data, eliminating the need for duplicate logging. This approach is resource-efficient and ensures that all block interactions are already being recorded by a trusted tool. The plugin simply interprets those logs through the lens of ore detection.
Commands and Permissions
Using Anti-Xray is straightforward. The primary command is:
/xlu <player> <time span in days>
This displays the number of ores a specific player has found within the given timeframe. For example, /xlu Steve 7 shows Steve’s ore discoveries over the past week. To access this command, a player needs the permission node antixray.use, which grants full access to the lookup function. Without this permission, the command will not work, ensuring that only trusted staff members can view sensitive data.
Configuration and Database Options
Anti-Xray is highly configurable to suit different server environments. By default, it uses SQLite, which requires no additional setup—just drop the plugin into your server’s plugins folder and it starts logging. If you prefer a more robust solution, you can switch to MySQL by changing the storageType value to "mysql" and filling in your database credentials in the config file.
Another important setting is keepData, which determines how many days of logs are retained. The default 365 days works well for most servers, but you can set it to -1 to store data indefinitely, or to 0 to wipe the database completely. This flexibility helps balance disk usage with the need for long-term tracking. While Anti-Xray is a server-side plugin, managing your Minecraft experience is seamless with the foxygame.net launcher, where you can download mods and server tools right from the menu, making it a convenient hub for both players and administrators who want a modern, flexible launcher.
The plugin also collects anonymous usage statistics through mcstats.org. If you prefer not to participate, simply open the config file and set useMetrics to false. This will stop all data reporting without affecting the core functionality.
Keeping Your Server Fair
Anti-Xray doesn’t prevent X-ray hacks from working—it instead gives you the information needed to catch and ban cheaters. By monitoring ore collection rates, it turns a difficult-to-detect cheat into a measurable statistic. Combined with a logging tool like CoreProtect, it becomes a comprehensive anti-cheat system that respects server performance. Whether you run a small survival world or a large multiplayer network, adding this layer of oversight helps maintain a fair and enjoyable environment for all players.
With its simple commands, database flexibility, and automatic log cleanup, Anti-Xray fits neatly into any server admin’s toolkit. Start tracking today and let the data reveal who is mining a little too luckily.