If you own a Minecraft server, you want to do everything you can to stop players from using X-Ray mods and other cheats in your world. X-Ray can be particularly damaging if ores are used as server currency, which allows cheaters to easily grind ores. Here are a few ways you can restrict these cheaters on your server.
1. If you have your server type as Paper, you can use a built in Anti-XRay measure that's built in.
2. Open the File Manager
3. Navigate to /minecraft/config/
4. Right click on paper-world-defaults.yml
and click Edit
5. On line 18. set enabled to true
6. Save the file and Restart the server. X-Ray abusers will now see something like this:
There are a few different anti-xray plugins and mods for Minecraft. Here are the most popular ones for each server type:
Spigot - OreAnnouncer
This plugin allows admins to see a special menu that will display how many ores different players are mining in the chat. This can be useful for tracking down X-Ray abusers since you'll be able to see if they're mining an abnormal amount of ores in a certain period of time.
Fabric/Forge/NeoForge - AntiXray(Fabric) (Forge)
This mod works very similarly to paper's built in AntiXRay. It simply disguises the unseen blocks all as ores so players will not be able to see ores through the ground.