Compatibility
Minecraft: Java Edition
Platforms
Tags
Creators
Details
AntiFreecam — Anti-Freecam & Anti-ESP protection for Paper 1.21.x
📖 OVERVIEW AntiFreecam is a lightweight, server-side anti-cheat that shuts down Freecam and ESP/X-ray vision cheats. It hides every block below a configurable Y-level from players who are on the surface, so a freecam or ESP camera flying underground sees nothing but solid stone — while normal underground gameplay stays completely vanilla. No client mod required; everything runs on the server through PacketEvents.
✨ FEATURES Freecam blocker — surface players are sent stone for everything below your Y-threshold. Anti-ESP — caves, bases, ores and entities underground are invisible from the surface. Vanilla-like reveal — when a player actually goes underground, the area around them is revealed smoothly. Auto re-mask — areas are hidden again the moment the player returns to the surface. Entity hiding — mobs and players below the threshold are hidden from surface players. Mod detection — best-effort client-brand check (Wurst) with auto-kick and admin alerts. Staff bypass — give your staff full vision with a single command. Clean, reloadable configuration.
⚙️ HOW IT WORKS
- The server intercepts outgoing chunk packets.
- For surface players, all blocks below hideBelowY are rewritten to stone before reaching the client.
- When a player descends, nearby chunks are re-sent un-masked so mining looks normal.
- When they climb back up, those chunks are re-masked.
📦 REQUIREMENTS Paper / Purpur 1.21.x Java 21 PacketEvents plugin installed (required dependency)
🚀 INSTALLATION
- Install PacketEvents into your plugins/ folder.
- Drop AntiFreecam.jar into plugins/.
- Restart the server — a config.yml is generated.
- Tune the settings and run /antifreecam reload.
🔧 COMMANDS & PERMISSIONS /antifreecam reload — reload the config (antifreecam.reload) /antifreecam bypass [player] — toggle masking bypass for staff (antifreecam.bypass)
🛠️ KEY CONFIG OPTIONS hideBelowY — hide everything below this Y from surface players revealBelowYWhenUnder — Y at which a player counts as "underground" lazyUnmask.distance — how far ahead is revealed underground (set near view-distance × 16 for full vanilla feel) maskEntities — hide below-Y entities from surface players modDetection — enable/disable Wurst detection, auto-kick and alerts
This plugin requires PacketEvents to run.
PacketEvents (free, required): Modrinth: https://modrinth.com/plugin/packetevents GitHub: https://github.com/retrooper/packetevents
Install PacketEvents into your plugins/ folder before using AntiFreecam.
Why "Invisible Walls" After Freecam Are Expected
This is not lag or a server bug — it is an intentional part of the protection system.
The server only reveals real blocks around a player's actual position. Any area below the protected Y-level that the player has not legitimately reached is sent as fake stone. When a freecam mod moves only the camera, the server still sees the player standing in the original location and continues sending masked block data.
Because of this, a player may appear to discover caves, ores, or tunnels with freecam, but those locations are not actually revealed by the server. Attempting to mine there will fail because the client's view does not match the server's real block data.
In some cases, even after moving the real character to that location, the affected chunks may remain desynced because they were previously loaded through freecam. The player may see missing terrain, void-like areas, or blocks that cannot be mined.
How to Fix It
There are only two ways to refresh those chunks:
- Move far enough away for the affected chunks to unload, then return without using freecam.
- Reconnect to the server, which forces a complete chunk resynchronization.
Once the chunks are refreshed normally, the real terrain will be revealed and mining will work as expected.
In short, freecam can show areas that the player has not legitimately reached, but those areas remain inaccessible until the server properly refreshes the chunk data.


