This article is also available in:
Minecraft | How to Enable Anti X-Ray on Paper

Minecraft Java Edition has a built-in Anti-XRay feature that prevents people from using any kinds of Xray software or resource pack.

Go to and click on your Server

STOP the server on Console

Go to File Manager in top menu.

Open Paper.yml

Find the anti-xray line, mostly at line 262 (Paper 1.17.1)

You'll have to set it to true to enable the Anti-XRay

The engine-mode will affect the performance of the anti-xray but it uses a considerable amount of hardware so if you have a weaker hardware, setting the engine mode to 2 will make your server lag

Click Save and Start your server.

All done! Your server should now have Anti-XRay!
Was this article helpful?
Thank you!