30% OFF First Invoice

Code at Checkout: TRICKYTRIALS

How to prevent XRay on a Minecraft Server

Last modified on Nov 27, 2023 in General

mc head By Dalton Whalen


As Minecraft is a game with no official anti-cheat or guidelines that prevent players from cheating, many players choose the dark side. The easiest form of cheating that your server denizens may adopt is X-Ray, which allows them to see through blocks by changing the textures of them to be completely transparent. They do this to make finding ores significantly easier to see, allowing them to save tons of time on what would be spent mining. Today’s guide will be on how to prevent the use of X-Ray on your server. With Apex Hosting, preventing X-Ray is very easy, so today we will be showing you two main methods to achieve this.

Paper Anti X-ray Installation:

This is the first and recommended method to perform anti X-ray on your server, as it is built into the PaperMC server version and requires no additional files to work. This will work a large majority of the time and should work on almost any PaperMC verison.


  1. Navigate to your Apex Server Panel.
  2. Scroll down to the JAR File section and ensure the server version is set to Paper.
    Xray Panel
  3. Make sure the server runs once, then stop it afterward and click FTP File Access on the left.
  4. While in this area, find and enter the config directory in the list.
  5. Proceed to press Edit for the paper-world-defaults.yml file, revealing its contents.
    Minecraft Paper Spigot Xray Setting
  6. Locate the anti-xray setting, then change its “enabled” option to true and tweak anything else.


Configuration Options:

Xray Config

enabled: true/false

This will enable or disable the anti-xray. Ensure you set it to true in order to enable it.
engine-mode: 1/2

Xray Engine

The engine mod settings will change how the server will display the ores. Engine mode 1 simply turns the blocks into stone, while engine mod 2 randomly adds fake ores to view.

We recommend using engine mode 1 for the best performance, but mode 2 can be used if preferred.

Xray Ores

This list will change which blocks are hidden from view. For example, you may want to add “ancient_debris” to the list.

Xray Hide Ores

These are the blocks that are used for replacement when using Engine mode 1. You can add more blocks into the mix or remove the ones you don’t like.

Once you have made your desired changes and ensure that it is set to enabled: true, press save, return to the main panel page, then restart the server.

Plugin Installation:

The second option is using a plugin in order to achieve a similar result. There are quite a few Anti X-ray plugins available, so we recommend browsing for a preferred one. An example may be the OreAnnouncer plugin to receive x-ray alerts.

Panel Installer:

  1. Navigate to the Apex Server Panel.
  2. Ensure the server version is running a plugin-compatible version, such as Spigot or Paper.
  3. Access the plugin list on the left.
    Xray Plugin Install
  4. Change the source, if necessary, then use the search bar to find your desired plugin.
  5. Choose the version if applicable, then press install.
  6. Restart your server when complete to load it up.


Manual Installation:

  1. Download the desired plugin from the Bukkit or Spigot website.
  2. Navigate to the Apex Server Panel.
  3. Ensure the server version is running a plugin-compatible version, such as Spigot or Paper.
  4. Navigate to the FTP File Access, then log in.
  5. Access the plugins folder, then press upload.
    Xray Plugins
  6. Drag + drop the .jar file to the right side for it to upload.
  7. When at 100%, return to the main page and restart the server.



That’s everything! For preventing the use of X-Ray, you really only have two options. The cleaner, easier method which will work for you 90% of the time, or the costly method, which may have more options but affect the server performance. Overall, cheating sucks, but we have the necessary tools to fight back. The reason we use the paper settings or specific plugins rather than a general Anti-Cheat is to minimize the resources used by these plugins, while still maximizing the effectiveness. I hope this guide helped you, and with that, have a great day.

Start Your Minecraft Server

Get started with your own minecraft server in 5 min and start trying out these great features.