Minecraft
How To Set Up Anti X-Ray for PaperSpigot Servers
Minecraft servers are constantly changing, and it's crucial to ensure a safe and fair gaming environment. One major issue that server admins often deal with is X-Ray cheaters, which let players see through blocks and ruin the game's integrity. In this blog post, we'll delve into the specifics of setting up Anti X-Ray measures designed specifically for PaperSpigot servers.
What is Paper's Anti-Xray?
If you're using Paper servers, you'll be glad to know that Paper Anti-Xray is included. This feature does exactly what it says - it prevents players from using x-ray. When someone tries to x-ray, it will make all blocks appear as ores, making it nearly impossible to x-ray.
How can I set up the Paper Anti-Xray?
Go to the File Manager.
Find the file called "paper.yml" (for the newer versions the config file is in the config folder and is called paper-world-defaults.yml) and click on it.
Once you're in the file, scroll down to line 286 and search for "anti-xray". When you find it, modify your settings to the following values:
anti-xray:
enabled: true
engine-mode: 2
max-block-height: 64
What is Engine-Mode and what's the difference?
Here's a very simple screenshot explaining all stages:
Source: https://docs.papermc.io/paper/anti-xray
Source: https://docs.papermc.io/paper/anti-xray
When it comes to the performance side, engine-mode: 1 is not as computationally demanding. It selectively hides ores that are fully covered by solid blocks, leaving those exposed to air or water visible. In contrast, engine-mode: 2 employs fake ores to obstruct the view of real blocks. By introducing air to hidden-blocks, engine-mode: 2 can successfully conceal all ores, including those exposed to air. Furthermore, engine-mode: 3 reduces network load by around 50% and assists with compressing chunk packets.
Once you've made the required adjustments to your settings, click on "save" located at the bottom right-hand corner. Then, restart your server and you're all set. If you've completed all the steps accurately, Paper Anti-Xray should now be working!