
FP's AntiFreecam
High-Performance Anti-Freecam/Anti-Xray for Spigot, Paper, Folia, and with Bedrock Support. Secure your world with ease againts freecammers.
🛡️ FPAntiFreeCam v1.4.3 — Security & Optimization Update
This massive update introduces critical security hardening, prevents CPU thread/scheduler leaks on reload, and resolves several gameplay edge-cases such as vehicle mounting and spectator mode bypasses. Fully tested and verified on PaperMC & Folia from 1.19 up to 1.21.11 / 26.1.2.
🔒 Security & Protection Hardening
- Pie-Chart Protection Overhaul: Removed the
isPieChartProtectionEnabledconditional guard from block entities and spawn entity packet interception. Security features (like stripping tile entity NBT data and hiding underground entity packets) are now active unconditionally while a player is in the protected zone. - Teleport Race Condition Fixed: Delayed state updates to align perfectly with the actual teleport tick. This eliminates a brief 1-tick window where client-side exploits could grab chest/ore data before the teleport fully registered.
- Surface Raycast Protection Fixed: Corrected a bug where players standing fractionally below the surface Y-level had their protection inadvertently disabled.
- Mounting Protection: Integrated
VehicleEnterEventandVehicleExitEventmonitors to instantly evaluate protection states when players enter or leave vehicles.
⚡ Bug Fixes & Optimizations
- Scheduler Thread Leaks Remedied: Resolved a CPU leak during command reloads (
/fpac reload) where repeating background tasks were not tracked and canceled. All active schedulers are now safely destroyed and re-initialized. - Spectator Mode Bypass Support: Fixed a layout obscuring issue where Spectators traversing protected zones were impacted by the void replacement blocks.
- Event Listener Cleanup: Dropped redundant Bukkit event listeners to prevent internal state-racing during gamemode transitions.
- Invite Link Fix: Fixed the expired Discord invite link in documentation.
🔧 Configuration
- Verified compatibility across configurations. No manual file changes required!
- Pie-Chart Protection Overhaul: Removed the
Changelog
- Layer 1 logic system was inverted, they are now fixed.
✨ New
-
Two-layer underground detection system — replaces the old single raycast zone with a cleaner, more reliable two-layer approach:
-
Layer 1 – Hard floor (
deep-deactivation-y, default Y=20): if a player's feet are below this Y, protection is unconditionally OFF. No raycast, no exceptions. Fixes the Y=16 void bug and trial chamber weirdness entirely. -
Layer 2 – Raycast zone (between
deep-deactivation-yandsurface-y): two sub-checks decide whether to arm protection — camera angle (looking upward) and sky visibility (open ceiling above). Both must be false to stay unprotected.
-
-
Update checker — on startup, the plugin checks Modrinth for a newer version. If one exists, a banner is printed to console and any online admins (
fpantifreecam.admin) are notified. New admins are also notified on join. Toggle viasettings.update-checker: true/false.
⚙️ Config
- Added
protection.deep-deactivation-y: 20.0— the absolute Y floor below which protection is always off. - Added
settings.update-checker: true— toggle the update checker. - Removed
protection.raycast.zone— replaced bydeep-deactivation-y. - Existing configs are automatically migrated on first load (no manual edits needed).
-
🐛 Bug Fixes
-
Fixed protection not working for most surface players — a broken
effectiveVoidYcalculation in the packet handler was setting the hide threshold to Y=-12 for players between Y=15–47, making bases fully visible. Underground blocks are now always hidden correctly at the configuredvoid-y. -
Fixed raycast and move handler fighting each other — when a player dipped just below
surface-y,onPlayerMovewould deactivate protection instantly, then the raycast task would re-activate it 250ms later, causing rapid state flipping and chunk refresh spam. The move handler now defers to the raycast task inside the raycast zone. -
Fixed eye-Y vs feet-Y inconsistency — the raycast task used eye position (~1.6 blocks above feet) while the move handler used feet position, creating a dead zone where neither system owned the state. Both now use feet-Y consistently.
-
Fixed raycast overshoot — the vertical ray was cast
surfaceY - eyeY + 2.0blocks, overshooting past the surface and registering false positives from surface-level blocks.
✨ New
- Raycast deactivation debounce — protection now waits a configurable delay before
deactivating when a player leaves the raycast zone, preventing flicker at the boundary.
Configurable via
protection.raycast.deactivation-debounce-ms(default:500).
⚙️ Config
- Added
protection.raycast.deactivation-debounce-ms: 500— existing configs are automatically migrated on first load (no manual edits needed).
-
Bug fixes + Stability
- New features: Raycast-based activation (look-up-from-cave check) + enhanced /fpac stats with TPS, memory, uptime, and packet counters.
- Optimizations: Section-level skipping in ChunkListener (skip whole sections above voidY instead of iterating all 16 Y layers per section), int ID comparison instead of equals(), and early-out if minY > voidY.
- Fixed Underground Chunks not loading when player is underground/looking at the Configured Y Level.
Initial Release v1.0.0
- Updated PacketEvents to v2.12.1 for full Minecraft 1.21+ and 26.1 support.
- Fixed the IllegalStateException: void future error for improved connection stability.
- Added native support for Paper, Purpur, Folia, and Bedrock (Geyser/Floodgate).
- Implemented a smart config auto-updater and refined the startup branding.

