CodeAntiESP
CodeAntiESP is a premium Anti-ESP tool specialized for SMP servers.
📖About CodeAntiESP
CodeAntiESP
Version: 1.0.0
Author: CodeTeam
Server: Paper 1.20+
Java: 17+
A server-side anti-cheat packet filter that neutralizes ESP, X-Ray, Freecam and structure-detection cheats — without installing anything on the client. CodeAntiESP intercepts and rewrites outgoing packets via ProtocolLib so that malicious clients never receive the data they need to cheat.
How It Works
CodeAntiESP hooks into the server's packet pipeline at the highest priority and rewrites or cancels outgoing packets per-player, in real time. It tracks each player's actual position, view distance and underground status to determine exactly which blocks, entities and structures they are legitimately allowed to see — and hides everything else.
Core Modules
Underground Block Obfuscation (Anti-X-Ray)
- Replaces all underground block states below a configurable Y level (default: Y=16) with stone in outgoing chunk, block-change and multi-block-change packets
- Two modes: safe post-chunk masking (default) sends fake block-change overlays after chunk load — no risk of client disconnects. Optional raw map-chunk rewriting for maximum throughput, gated behind a safety flag
- Strips hidden block-entity data (chests, spawners, vaults, etc.) from chunk packets so container ESP cannot read them
- Zeros block-light data for hidden sections to prevent light-based ESP from mapping caves
- Local mining reveal: when a player actually breaks a block underground, only that block's real state is sent back — and it reverts after a configurable timeout
- Nearby reveal: real blocks within a small radius around the player are restored so legitimate gameplay looks normal
Entity Hider (Anti-Entity-ESP)
- Cancels all entity-related packets (spawn, movement, metadata, equipment, effects, animation, etc.) for entities below the deepslate Y level that the player cannot legitimately see
- Budgeted per-tick scanning with configurable throughput to keep MSPT cost low
- Handles entity destroy, mount/passenger references and tab-list packets to prevent ghost entities
Player Hider (Anti-Player-ESP)
- Hides other players from viewers who cannot actually see them (no line-of-sight or too far away)
- Uses server-side
hasLineOfSightchecks with a configurable distance threshold - Caches visibility decisions per viewer/target pair with a TTL to avoid redundant raycasts
- Keeps hidden players in the tab list (so they still appear online) while suppressing their in-world entity packets
Freecam Detection
- Validates incoming position packets against the server's cached player position
- If a movement packet reports a position farther than the configured desync threshold (default: 48 blocks), the player is quarantined — new chunk packets are temporarily blocked for that player
- Detects chunk, block-change and multi-block-change packets targeting chunks outside the server's view matrix
- All violations trigger admin alerts with per-player cooldown to prevent spam
ESP Decoys (Honeypot)
- Sends short-lived fake entity spawn packets (zombies, skeletons, creepers, armor stands — fully configurable) at random underground locations around each player
- ESP clients render these as real entities, making ESP overlays unreliable and confusing
- Decoys auto-expire after a configurable lifetime and are never real server entities — zero world impact
Fake Block Decoys (Honeypot)
- Sends fake block-change packets for high-value blocks (diamond ore, ancient debris, chests, spawners, vaults, etc.) at random underground positions
- X-Ray clients see fake ores and containers that don't actually exist
- Blocks are restored to their real state when the player gets close enough
- Fully configurable block types, spawn rate, lifetime, distance and Y range
Amethyst Cluster Hider
- Hides amethyst blocks, budding amethyst and amethyst clusters/buds from ESP clients until the player is actually nearby
- Scans a configurable Y range and replaces amethyst with stone in outgoing packets
- Reveals real amethyst when the player enters the render distance, then re-hides it when they leave
Structure Hider
- Blocks custom payload packets on channels that leak structure data:
debug/,structure,worldgen,poi,village,stronghold,mineshaft,monument,fortress,bastion,end_city,ancient_city,trail_ruins,trial_chambers,jigsaw - Cancels debug sample payloads that can expose structure bounding boxes
- Near-zero MSPT cost — pure packet cancellation
Admin Alerts
- Real-time in-game alerts to staff with the
codeantiesp.alertspermission when a player is flagged for suspicious behavior - Console logging of all flagged events (configurable)
- Per-player alert cooldown to prevent chat spam
/codeantiesp statusshows live runtime statistics (tracked players, active modules, config values)
Commands
| Command | Description |
|---|---|
/codeantiesp |
Shows runtime status and all active module states |
/codeantiesp reload |
Reloads config.yml without restarting the server |
/codeantiesp status |
Same as /codeantiesp — displays current configuration and tracked player count |
Permissions
| Permission | Default | Description |
|---|---|---|
codeantiesp.admin |
op |
Manage the plugin (reload, status) |
codeantiesp.alerts |
op |
Receive real-time suspicious-player alerts in chat |
Configuration
CodeAntiESP ships with sensible defaults — drop the jar in, and it works. Every module can be individually toggled and tuned in config.yml:
deepslate-y-level— Y level below which underground data is hidden (default: 16)post-chunk-mask— safe fake-block overlay after chunk load (default: on)nearby-reveal-radius-blocks— real blocks restored within this radius of the player (default: 5)entity-hider— hide underground entities from surface players (default: on)player-hider— hide players without line-of-sight (default: on)freecam-detection— validate movement packets and block out-of-range chunks (default: on)esp-decoys— send fake entity honeypots to poison ESP (default: on)fake-block-decoys— send fake ore/container honeypots to poison X-Ray (default: off)amethyst-cluster-hider— hide amethyst geodes from ESP (default: off)structure-hider— block structure-revealing payload channels (default: on)disabled-worlds— worlds where CodeAntiESP does nothing (default: spawn, afk)
Dependencies
- ProtocolLib 5.3.0+ (required)
Performance
- Post-chunk masking is budgeted: configurable sections-per-tick, layers-per-step and a nanosecond tick budget (default: 0.75 ms) ensure masking never spikes MSPT
- Entity hiding is budgeted: configurable players-per-tick with a rotating cursor for even distribution
- Visibility caches with TTLs prevent redundant raycasts and distance checks
- Structure hiding is pure packet cancellation — effectively zero cost