
Anti-xray, anti-ESP, and freecam protection for underground chunks on Paper servers.

ChunkVeil is a free, open-source Paper + ProtocolLib anti-xray and anti-ESP protection plugin focused on underground chunk leaks.
Most anti-xray tools focus on ores. ChunkVeil goes further: it helps hide underground chunks, cave shapes, hidden rooms, storage areas, block entities, entity spawns, and later block updates before modified clients can use that information.
It is built for server admins who want stronger protection against xray, ESP, freecam scouting, cave discovery, hidden-base discovery, and PieChart-style underground leaks without adding a full gameplay anti-cheat.
ChunkVeil reduces what the client can learn. It does not claim to make every hacked client impossible to use.


ProtocolLib version matters. Use the ProtocolLib build recommended for your server version:
https://www.spigotmc.org/resources/protocollib.1997/
ChunkVeil is tested on Paper 1.21.11 and Paper 26.1.2. Other Paper 1.21.x and 26.x builds are expected to work when paired with a compatible ProtocolLib build, but they are not all tested before each release.

If the main packet rewrite path cannot start, or if a critical packet rewrite incompatibility appears at runtime, ChunkVeil fails closed and disables its runtime protection. This avoids giving admins false confidence when underground data cannot be hidden before send.
ChunkVeil is primarily designed for the overworld. Nether and End can be configured, but they are disabled by default because their terrain and fake block choices usually need separate testing.
These screenshots use an xray-style view so the difference is easy to see.

With ChunkVeil disabled, underground terrain, caves, ores, structures, and hidden spaces can be visible to modified clients before the player should know about them.
hide-air: false
This is the recommended default. Air stays air, so caves and empty pockets may still appear as open space, but solid hidden blocks are replaced with the configured fake block, such as DEEPSLATE. This is faster and reduces the most useful block information without rewriting huge amounts of air.
hide-air: true
When hide-air is enabled, ChunkVeil also replaces underground air with the fake block. This makes cave shapes, rooms, and hidden base layouts much harder to read from the client side, but it costs more because many more blocks need to be rewritten.
ChunkVeil can run alongside Paper's built-in anti-xray and packet-based plugins such as Orebfuscator. Paper anti-xray usually runs before ProtocolLib sees the outgoing chunk packet, and ChunkVeil then applies its underground hiding pass to the packet the player is about to receive.
For the strictest protection, test your exact plugin stack with /chunkveil status, an xray/freecam client, and both hide-air: false and hide-air: true depending on how much cave/base shape you want to conceal.
ChunkVeil.jar in your server's plugins folder.plugins/ChunkVeil/config.yml and plugins/ChunkVeil/lang.yml./chunkveil status in-game or from console.worlds:
world:
enabled: true
hide-below-y: 0
min-y: -64
default-fake-block: DEEPSLATE
hide-air: false
hide-entities: true
hide-players: false
hide-air: false is recommended for most servers because it is much lighter. Use hide-air: true when hiding cave shapes and hidden base layouts is more important than performance.
/chunkveil status - Shows runtime state, worlds, queue size, rewrite status, and metrics./chunkveil compat - Shows server, Java, ProtocolLib, rewrite, runtime, and warning diagnostics./chunkveil inspect <player> - Shows a player's current ChunkVeil state, visible chunks, queue count, view distance, and bypass state./chunkveil report - Creates a diagnostic report file for troubleshooting./chunkveil predict <players> <ramGb> <cpuTier> [viewDistance] - Estimates performance from live timing samples./chunkveil reload - Reloads config and language files./chunkveil refresh - Forces a rescan and refresh for online players./chunkveil disable - Emergency switch that restores real chunks for online players./chunkveil enable - Starts the runtime again./chunkveil debug on|off - Toggles debug metrics./chunkveil version - Shows the plugin version.Alias: /cv
chunkveil.adminchunkveil.statuschunkveil.compatchunkveil.inspectchunkveil.reportchunkveil.predictchunkveil.reloadchunkveil.refreshchunkveil.togglechunkveil.debugchunkveil.versionchunkveil.bypass/chunkveil status./chunkveil compat and check for warnings.hide-below-y./chunkveil inspect <yourname>./chunkveil report before reporting bugs./chunkveil refresh./chunkveil disable to restore real chunks for online players./chunkveil debug on while testing.Please report bugs on GitHub:
https://github.com/DeKaeyman/ChunkVeil/issues
Include your ChunkVeil version, Paper version, ProtocolLib version, logs, config, and reproduction steps.