General

How to Block X-Ray Cheating on a Minecraft Server

General·May 20, 2026·16 min read

Overview

Minecraft does not include a built-in anti-cheat system for servers, so server owners need to handle common cheats themselves. One of the simplest and most annoying examples is X-Ray. Players use X-Ray resource packs or client modifications to make normal blocks transparent, which lets them spot ores, caves, and valuable blocks without doing the actual mining.

That quickly ruins survival economies and progression. Diamonds are supposed to take effort, not a suspiciously straight tunnel into every ore vein on the map.

There are two practical ways to reduce X-Ray abuse on a Minecraft server: enable Paper's built-in anti-xray system, or install a plugin that detects or hides suspicious ore behavior. Paper's option is usually the best starting point because it is already included with the server software and does not require extra files.

Enable Paper Anti-Xray

Paper includes anti-xray protection in its configuration files. This method works for most Paper servers and is generally lighter than adding another plugin.

Preparation

  • Open your server panel.
  • Find the JAR/version selector or server software section and make sure the server is using Paper.
  • Start the server once so Paper can generate its files, then stop it.
  • Open FTP, your file manager, or an FTP client from the panel.
  • Enter the `config` directory.
  • Edit `paper-world-defaults.yml`.
  • Find the `anti-xray` section.
  • Change `enabled` to `true`, then adjust the other options as needed.

Paper Anti-Xray Settings

enabled

Use this option to turn anti-xray protection on or off.

```yaml enabled: true ```

Set it to `true` to enable the feature. If it is set to `false`, Paper will not hide ores from X-Ray users.

engine-mode

The `engine-mode` setting controls how Paper disguises hidden blocks.

  • `engine-mode: 1` replaces hidden ores with normal-looking blocks, such as stone.
  • `engine-mode: 2` shows fake ores mixed into the view, making X-Ray results unreliable.

Mode 1 is usually better for performance. Mode 2 can be useful if you want stronger confusion for X-Ray users, but it may cost more server resources.

Hidden Blocks

The hidden blocks list controls which blocks Paper should hide from players using X-Ray. Common choices include valuable ores and blocks like diamond ore, emerald ore, gold ore, and ancient debris.

If your server uses newer versions or custom world generation, check this list carefully. For example, adding `ancient_debris` helps protect Netherite progression.

Replacement Blocks

Replacement blocks are what players see instead of the hidden blocks when using engine mode 1. You can keep the default options, add more natural-looking blocks, or remove any replacements that do not fit your world.

After editing the settings, save the file, return to the main server panel, and restart the server so the changes take effect.

Use an Anti-Xray Plugin

A plugin is the second option. This can be useful if you want alerts, logging, staff notifications, or extra detection features instead of only hiding ores. For example, some plugins can notify staff when a player mines too many valuable ores in a short time.

Plugins can also add overhead, so avoid installing several anti-cheat tools that all inspect the same activity. That is how performance quietly leaves the room.

Install From the Panel

  • Open your server panel.
  • Make sure the server is running a plugin-compatible platform, such as Paper or Spigot.
  • Open your plugins page or the plugin management section.
  • Change the plugin source if needed.
  • Search for the anti-xray plugin you want to use.
  • Select a version if the installer provides multiple choices.
  • Install the plugin.
  • Restart the server so it loads.

Install Manually

  • Download the plugin `.jar` file from a trusted source such as Bukkit or Spigot.
  • Open your server panel.
  • Confirm the server is running Paper or Spigot.
  • Open FTP, your file manager, or an FTP client.
  • Go to the `plugins` folder and upload the file.
  • Wait until the upload reaches 100%.
  • Return to the main panel and restart the server.

After the restart, check the plugin's generated configuration files. Many anti-xray plugins include settings for alerts, permission bypasses, worlds, and ore thresholds.

Which Method Should You Choose?

For most Minecraft servers, start with Paper's built-in anti-xray. It is simple, effective, and avoids adding another plugin to the server.

Use a plugin when you need extra staff tools, mining alerts, logs, or behavior detection. A plugin may offer more control, but it can also use more resources depending on how it scans player activity.

The best setup is usually Paper anti-xray for prevention, plus one lightweight alert plugin only if staff need more visibility. That keeps the server protected without turning anti-cheat into the heaviest system on the machine.

Still have questions?

Come chat with us and we will get back to you as soon as possible!

Contact Support