Anti-Xray
Hide valuable blocks from x-ray cheats.
On this page
X-Ray is a cheat that lets players see valuable blocks (diamond, gold, etc.) through walls. On a Java server, anti-xray can be enabled to conceal valuable blocks from cheating clients.
Enable Anti-Xray#
Anti-xray is configured in server.properties (or via paper-world-defaults.yml if using Paper/Purpur).
Via server.properties#
- Open Files →
server.properties. - Find and set the following line:
properties
anti-xray-enabled=true - Save and Restart the server.
Via Paper/Purpur (Stronger)#
Open config/paper-world-defaults.yml and find the anti-xray section:
yaml
anti-xray:
enabled: true
engine-mode: 2
hidden-blocks:
- diamond_ore
- deepslate_diamond_ore
- emerald_ore
- gold_ore
- ancient_debris
replacement-blocks:
- stone
- deepslate
Save and restart.
Engine Mode Explained#
| Mode | Behavior |
|---|---|
| 1 | Light, good for small servers. |
| 2 | Conceals more thoroughly, slightly heavier. |
| 3 | Most aggressive, affects performance. |
Tip
Start with `engine-mode: 2`. Increase only if too much still slips through.
Note#
Caution
Anti-xray does not 100% eliminate x-ray (certain mod-based cheats may still bypass it). Add an anti-cheat plugin for layered protection.
