Tutorials
Configuring and managing your server

How to prevent XRay on your Server

X-Ray is a popular cheat for Minecraft that allows players to see through blocks and locate valuable resources such as diamonds and gold. This cheat can significantly impact the gameplay of your Minecraft server and can ruin the fun for legitimate players. In this article, we will discuss some of the ways to prevent X-Ray on a Minecraft server.


Using PaperMC integrated Anti X-ray

We will use the native PaperMC feature to block X-ray on your server, without the need of additional files.

Installing PaperMC

1. Go to "Settings" panel.

2. Click on "Server Version", select the version of PaperMC you want.

3. Click on "SAVE CHANGES"


Configuring Anti X-ray

1. Click on WebFTP on the top of your panel

2. Open the config folder

3. Select the paper-world-defaults.yml file, and click on "Edit"

4. Turn enabled setting to true, to activate the anti x-ray

5. Start the server with play button, on the top of your panel, your anti x-ray is now functional.


Advanced configuration

Engine-mode
You can change the setting engine-mode to 1 (default) or 2

This setting will change how the server display the ores.
engine-mode 1 turns the block into stone, while engine mod 2 adds fake ores.



Hidden-blocks
You can select the block that you want ot hide here.

Replacement-blocks
While using engine-mode 1, you can select the blocks used to replace the ore.



Using Plugins to block X-ray

  1. Use Anti-Cheat Plugins: Anti-Cheat plugins are one of the most effective ways to prevent X-Ray cheats on a Minecraft server. These plugins can detect when a player is using X-Ray or other cheats and automatically kick or ban them from the server. Some popular anti-cheat plugins for Minecraft servers are NoCheatPlus, AntiCheat, and Matrix Anti-Cheat.

  2. Use Orebfuscator: Orebfuscator is a plugin that adds fake ores to the world, making it difficult for X-Ray cheats to locate real ores. This plugin is particularly effective in preventing X-Ray cheats that rely on texture packs to locate ores. Orebfuscator is compatible with most versions of Minecraft and is easy to install.

  3. Enable Spawn Protection: Spawn Protection is a setting in Minecraft that prevents players from destroying blocks within a certain radius of the spawn point. Enabling this setting can prevent X-Ray cheats from finding valuable resources near the spawn point. To enable Spawn Protection, you can edit the server.properties file and set the spawn-protection value to the desired radius.

  4. Use WorldGuard: WorldGuard is a plugin that allows you to set up regions with specific rules on your Minecraft server. You can use this plugin to prevent players from breaking certain blocks or entering specific areas of the world. By setting up a region around valuable resources and preventing players from breaking blocks within that region, you can prevent X-Ray cheats from locating those resources.

  5. Use a Resource Pack: Resource Packs can be used to change the textures of blocks in Minecraft. By creating a custom resource pack that changes the texture of valuable resources such as diamonds or gold to a common block such as stone, you can prevent X-Ray cheats from locating those resources. This method is not foolproof, as players can still use other cheats such as brightness mods to locate resources, but it can be effective in combination with other methods.