How to Stop X-Ray on Your Minecraft Server

Learn how to configure Paper's anti-xray engine or install anti-xray plugins to prevent cheating.

X-ray texture packs and mods let players see ores through stone, giving them an unfair advantage. Paper has a built-in anti-xray engine that effectively blocks this.

Open the Paper config

Access the XGamingServer panel, go to Files, and open config/paper-world-defaults.yml.

Enable anti-xray

Find the anticheat section and set:

anticheat:
  anti-xray:
    enabled: true
    engine-mode: 2
    hidden-blocks:
      - diamond_ore
      - deepslate_diamond_ore
      - gold_ore
      - deepslate_gold_ore
      - iron_ore
      - deepslate_iron_ore
      - emerald_ore
      - deepslate_emerald_ore
      - lapis_ore
      - deepslate_lapis_ore
      - redstone_ore
      - deepslate_redstone_ore
      - copper_ore
      - deepslate_copper_ore
      - ancient_debris
    replacement-blocks:
      - stone
      - deepslate
      - netherrack

Restart your server

Engine Modes:

  • Mode 1: Hides ores by replacing them with stone on the client. Lightweight but some x-ray mods bypass it.
  • Mode 2: Replaces all blocks with random ore data. More effective, slightly more bandwidth usage. Recommended.

💡 Tip: Mode 2 makes all hidden blocks appear as random ores to x-ray users, making it impossible to distinguish real from fake.

Method 2: Anti-Xray Plugins (Non-Paper)

For Spigot or other server types, install an anti-xray plugin like Orebfuscator from SpigotMC.

📝 Note: Paper's built-in anti-xray has minimal performance impact. Mode 2 uses slightly more bandwidth but is far more effective.

See also: Performance Guide

If you need help, join our Discord.

How is this guide?

40% Off — Limited TimeGet your Minecraft server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page