Minecraft

How to Stop X-Ray on a Minecraft Server

Turn on Paper's built-in anti-xray to hide ores from x-ray texture packs and mods.

Updated 1 min read

X-ray mods and texture packs let players see ores through stone. Paper has anti-xray built in: it hides ores from the client until they're exposed.

Turn it on (Paper)

  1. In Console, click Stop.
  2. In Files, open config/paper-world-defaults.yml.
  3. Find anticheat: → anti-xray: and set:
anticheat:
  anti-xray:
    enabled: true
    engine-mode: 2
  1. Save and start the server.

Engine modes

Mode What it does
1 Hides ores by replacing them with stone. Light on the server
2 Fills hidden areas with fake ores, so x-ray shows ores everywhere. Stronger, uses more CPU and bandwidth
3 Like mode 2, with less CPU use; newer Paper versions only

The hidden-blocks list sets which blocks are hidden. The default covers the usual ores.

The Nether

Set it per world in world_nether/paper-world.yml and add Nether ores such as ancient_debris to hidden-blocks.

Not on Paper?

Vanilla has no anti-xray. On Fabric and Forge, look for an anti-xray mod in Package Manager, or switch to Paper if you run plugins.

Still stuck?

Ask the community on Discord, or open a ticket and we'll reply within 4 hours on business days.