Compatibility
Minecraft: Java Edition
Platforms
Links
Tags
Creators
Details
AntiXRay — High-Performance Raytrace Anti-XRay
Prevents X-Ray clients from seeing ores and hidden blocks using a Digital Differential Analyser (DDA) raytracing algorithm. Only blocks a player can legitimately see are sent — everything else is replaced with innocent stone in the chunk packet before it leaves the server.
🔭 How It Works
Player Eye ──── DDA ray (7 origins, N steps) ────► [Diamond Ore]
↑
Blocked by solid block?
YES → send fake stone
NO → reveal real block
For every protected block in view distance, 7 rays are cast from around the player's eye position. If any single ray arrives unobstructed, the block is revealed. Otherwise the client receives a harmless replacement block. The inner loop is intentionally simple so the JVM's JIT compiler can auto-vectorise it with SIMD instructions.
⚙️ Engine Modes
| Mode | Security | CPU cost | Description |
|---|---|---|---|
RAYTRACE |
⭐⭐⭐ | Medium | Full DDA raytracing for every protected block |
PROXIMITY |
⭐⭐ | Low | Hide blocks with no adjacent air/transparent neighbour |
HYBRID ✅ |
⭐⭐⭐ | Low–Medium | Proximity first, raytrace only on blocks that pass — recommended |
✨ Features
- DDA Raytracing — 7 ray origins per block, configurable step count (default: 12)
- Work-stealing thread pool — ForkJoinPool auto-sized to CPU cores, chunk sections processed in parallel
- Lock-free TTL cache —
ConcurrentHashMap-backed cache with configurable TTL, avoids recomputing the same ray twice - TPS guard — automatically skips heavy processing when server TPS drops below a configurable threshold
- Per-world configuration — independent engine mode, ore list, and replacement block per world
- Folia native support —
RegionScheduler+AsyncSchedulervia reflection, respects per-region tick budgets - X-Ray detection — 60-second sliding window per player with per-category thresholds (diamond, ancient debris, emerald, generic)
- Detection alerts — staff chat notifications, log file, custom punishment commands with
%player%/%world%/%x%/%y%/%z%placeholders - Full 1.16–1.21 ore list — deepslate ores, Ancient Debris, Trial Spawner, Vault, Spawner, Chests
- Bypass permission —
antixray.bypassfor trusted staff and creative players
🖥️ Platform Compatibility
| Platform | Status | Notes |
|---|---|---|
| Bukkit / CraftBukkit | ✅ Full | Standard BukkitScheduler, block-update fallback |
| Spigot | ✅ Full | All Spigot optimisations respected |
| Paper | ✅ Full | Async chunk API, packet-level interception |
| Purpur | ✅ Full | All Paper features + Purpur config detected |
| Folia | ✅ Full | folia-supported: true, RegionScheduler via reflection |
🚨 X-Ray Detection
Detection thresholds (all configurable in config.yml):
| Category | Default threshold |
|---|---|
| Diamond ore | 6 per minute |
| Ancient Debris | 3 per minute |
| Emerald ore | 8 per minute |
| Generic ores | 15 per minute |
Alert actions: in-chat staff notification · log file (plugins/AntiXRay/logs/detections.log) · custom commands
📋 Commands
Aliases: /antixray, /axr, /xray
| Command | Description |
|---|---|
/axr reload |
Reload config.yml without a server restart |
/axr status |
Show engine mode, thread count, ray counters, cache size |
/axr debug |
Show current debug mode status |
/axr bypasslist |
List all online players with bypass permission |
🔑 Permissions
| Node | Default | Description |
|---|---|---|
antixray.admin |
op | Access to all /axr commands |
antixray.bypass |
false | Skip obfuscation — for trusted staff / creative mode |
antixray.notify |
op | Receive in-chat X-Ray detection alerts |
⚡ Performance Presets
| Server size | ray_steps |
cache_ttl_ticks |
async_processing |
|---|---|---|---|
| Small (< 50 players) | 16 |
2 |
true |
| Medium (50–200) | 12 |
4 |
true |
| Large (200+) | 8 |
8 |
true |
| Budget VPS | 4 |
10 |
false |
📦 Installation
- Drop
AntiXRay-2.0.0.jarinto yourplugins/folder - Start / restart the server —
plugins/AntiXRay/config.ymlis generated automatically - Tune settings for your server size
- Run
/axr reload
Requirements: Java 17+ · Minecraft 1.16.x – 1.21.x · Any Bukkit-compatible server
Build from source:
mvn clean package
# Output: target/AntiXRay-2.0.0.jar
📜 License
MIT License — free to use, modify, and redistribute.
| Minecraft | 1.7.x-1.21.x |
| Server Software | Paper, Purpur, Folia, Bukkit, Spigot |
| Java | 21+ |
| ProtocolLib | Please use the Newst Version |


