How to enable Anti-Xray in Minecraft PaperMC settings
Level: Intermediate
In this guide, we will show you step-by-step how to enable Anti-Xray in the Minecraft PaperMC settings. We will also explain the differences between engine-mode 1 and engine-mode 2.
How to enable Anti-Xray in Minecraft PaperMC settings
Step 1: Locate the paper.yml file
- Locate the
paper-world-defaults.yml
which is located inside theconfig/
folder. This file contains the configuration settings for PaperMC.
Step 2: Open the paper.yml file
- Open the
paper-world-defaults.yml
file using the inbuilt text editor by clicking on it.
Step 3: Locate the anti-xray section
- Find the
anti-xray
section within thepaper.yml
file. This section contains the settings for Anti-Xray.
anticheat:
anti-xray:
enabled: false
engine-mode: 1
hidden-blocks:
- copper_ore
- deepslate_copper_ore
- gold_ore
Step 4: Enable Anti-Xray
- Change the value of
enabled
fromfalse
totrue
. This will enable the Anti-Xray feature on your server.
enabled: true
Step 5: Choose the engine mode
-
Decide whether to use engine-mode 1 or engine-mode 2 for your server. Here's a quick explanation of both modes:
-
engine-mode: 1: Replaces specified blocks (hidden-blocks) with "fake" blocks based on the dimension (stone, deepslate, netherrack, or end_stone). Only ores covered by solid blocks will be hidden. This mode is less computationally intensive on the client side.
-
engine-mode: 2: Replaces both hidden-blocks and replacement-blocks with randomly generated hidden-blocks. Fake ores obstruct the view of real blocks. This mode may better prevent Xray, but can cause client performance issues (FPS drops) for some players.
-
-
Set the
engine-mode
value to your preferred mode (either 1 or 2).
These two images are from the paper documentation
Step 6: Save and restart the server
- Save the changes you made to the
paper.yml
file and restart your Minecraft server for the changes to take effect.
With Anti-Xray enabled and configured, your server will now be more secure against players using Xray hacks. Keep in mind that Anti-Xray is not foolproof, and additional measures (such as anti-cheat plugins) can further help protect your server.