> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.sparkedhost.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Stop XRay in Minecraft

Looking to stop XRay in Minecraft and keep your server fair? X-Ray cheats give players an unfair advantage by revealing hidden ores, but you can block them by installing anti-XRay plugins, configuring server settings, and using anticheat tools. PaperMC and Spigot offer built-in X-Ray prevention, while plugins like Orebfuscator and Anti-XRay help disguise valuable resources.

Here are a few methods to stop XRay cheaters from ruining the economy on your Minecraft server.

Don't already host with us? 10,000+ server owners trust Sparked Host for lag-free Minecraft worlds. [Claim your server savings](https://sparkedhost.com/minecraft-server-hosting?utm_source=referral&utm_medium=knowledge_base&utm_campaign=kb_redirect&utm_content=intro) to get higher performance at less $ per month.

${youtube}[](EgLt-qzDtsU)
---

## Method 1: Use Anti-XRay Server Plugins

You can install X-Ray prevention plugins to block players from using X-Ray on your Minecraft server.

### PaperMC

**PaperMC** has built-in anti-XRay features that help prevent players from using X-Ray cheats on your server.

> **Note:** You must be running the **PaperMC** version. Follow this [guide](https://help.sparkedhost.com/en/article/how-to-change-a-minecraft-server-version-127uv7i/) to change versions.

1. Open your [Apollo Panel](https://control.sparkedhost.us/).
2. Navigate to your server.
3. Open the "File Manager"

   ![](https://images.surferseo.art/59d006a5-72e3-46c0-b5ac-12aad5d889ca.png =256x394)

4. Open the "config" folder.

   ![](https://images.surferseo.art/3ba344b4-1cb7-4c57-977b-8f43edd1bb3a.png =768x541)

5. Open the "paper-world-defaults.yml" file.

   ![](https://images.surferseo.art/8c4bb114-b048-44df-8f39-82113c061e6d.png =768x387)

6. Find the "anti-xray" section and set "enabled" to `true`.

7. Configure the "engine-mode":
* `engine_mode: 1` - Replaces hidden blocks with fake ores.
* `engine_mode: 2` - Replaces both hidden and replacement blocks with randomly generated fake ores.

   ![](https://images.surferseo.art/3576f6dd-01bc-46c3-9df3-1f88ee456654.png =768x300)

   ![](https://cdn.apexminecrafthosting.com/img/uploads/2021/07/09175310/XrayEngine.png)
---

## Method 2: Use Anti-Cheat Server Plugins

Adding anti-cheat plugins is another option for stopping XRay on your Minecraft server. 

### NoCheatPlus

> **Note:** You must be running **Paper** or **Spigot** versions. Follow this [guide](https://help.sparkedhost.com/en/article/how-to-change-a-minecraft-server-version-127uv7i/) to change versions.

**Optional:** For improved performance and better detection, install **ProtocolLib**.

1. Download **NoCheatPlus** from [here](https://www.spigotmc.org/resources/nocheatplus.26/). (Recommended version: 1.12 or earlier)
2. Download **ProtocolLib** from [here](https://www.spigotmc.org/resources/protocollib.1997/) ( **optional**).

   ![](https://images.surferseo.art/bdd69c3f-0e8f-454e-882e-c285fc87fbf7.png =1024x598)

3. Go to the "Files" tab and open the "plugins" folder.

   ![](https://images.surferseo.art/136ef334-0c53-482d-828d-9dde1dcd8b6b.png =1024x565)

4. Upload the downloaded plugins.

   ![](https://images.surferseo.art/8f15307c-a161-4719-b92d-48f10377c3e0.png)

5. Start your server and run the command:
   
```bash
/plugins
```

   ![](https://images.surferseo.art/2a23e3ba-c560-4e80-857f-0a71de6d32ae.png =768x181)

   If **NoCheatPlus** and **ProtocolLib** appear, they were installed correctly.

For more details on **NoCheatPlus** features, visit their [GitHub](https://github.com/NoCheatPlus/Docs/wiki/Features).
---

## Method 3: Set Up Ore Scrambling

Ore scrambling helps enhance anti-XRay protection and adds a challenge by disguising ores.

**Features of Ore Scrambling:**
* Stop the generation of specific ores.
* Prevent large ore vein generation.
* Control which blocks generate and their replacements.
* Configure the number of ores per chunk.

1. Download **Ore Control** from [here](https://www.spigotmc.org/resources/ore-control-%E3%80%8E1-18-1-21-4%E3%80%8F.63621/).

   ![](https://images.surferseo.art/adbe746e-7a03-452b-9f43-8828efb6fed7.png)

2. Open the "Files" tab and navigate to the "plugins" folder.

   ![](https://images.surferseo.art/136ef334-0c53-482d-828d-9dde1dcd8b6b.png =768x424)

3. Upload the downloaded plugin.

   ![](https://images.surferseo.art/8f15307c-a161-4719-b92d-48f10377c3e0.png =1024x129)

4. Start your server and enjoy enhanced anti-XRay protection!
---

## Still Have Some Questions?

If you need more help, feel free to submit a ticket [here](https://billing.sparkedhost.com/submitticket.php).