
Need a server?
Click the banner below and use code FLEOX for 30% off your first 2 billing cycles with Alyrix Cloud:

Alyrix Cloud
Protect underground bases, caves, and hidden structures from players using FreeCam / X-Rray (Soon) / Block ESP mods. FPAntiFreeCam intercepts outgoing packets and replaces underground blocks with air so FreeCam users see nothing but void below the surface.
π Dependencies
FPAntiFreeCam requires the following plugin to be installed on your server:
- PacketEvents 2.x β Required for packet interception & protocol handling.
β¨ Features
- ποΈ Anti-FreeCam / Anti-Xray β hides all underground blocks via packet manipulation.
- π¦ Entity hiding β conceals mobs, item frames, and farms inside protected zones.
- π Update checker β notifies admins in-game and in console when a new version is available.
- β‘ Async & optimized β tick-batched chunk refreshes, minimal performance impact.
- π Universal platform support β Paper, Purpur, Spigot, Bukkit & Folia (multi-threaded region-aware scheduling).
- π± Bedrock support β Geyser / Floodgate compatible.
π₯οΈ Commands
| Command | Description | Permission |
|---|---|---|
/fpac reload |
Reload the config | fpantifreecam.admin |
/fpac stats |
Show live plugin stats | fpantifreecam.admin |
/fpac debug |
Toggle debug logging | fpantifreecam.admin |
/fpac world <add\|remove> <world> |
Add/remove a protected world | fpantifreecam.admin |
/fpac bypass <player> |
Toggle bypass for a player | fpantifreecam.admin |
/fpac help |
Show command help | fpantifreecam.admin |
/fpreload |
Quick config reload shortcut | fpantifreecam.admin |
/fpdebug |
Quick debug toggle shortcut | fpantifreecam.admin |
Aliases: /fpafc, /antifreecam, /fpacreload, /fpacdebug
π Permissions
| Permission | Description | Default |
|---|---|---|
fpantifreecam.admin |
Full access to all commands | OP |
fpantifreecam.reload |
Reload configuration | OP |
fpantifreecam.debug |
Toggle debug mode | OP |
fpantifreecam.world |
Manage protected worlds | OP |
fpantifreecam.bypass |
Exempt from protection (staff/builders) | β |
βοΈ Config
Click to expand config.yml
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# FPAntiFreeCam configuration
# Anti-FreeCam protection for Spigot, Paper and Folia (1.19 - 26.1+)
# Apply changes with /fpac reload.
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Do not change this manually.
config-version: 5.3
# ββ General ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
settings:
# Check for updates on startup and tell admins on join.
update-checker: true
# Language file to use, from plugins/FPAntiFreeCam/lang/<language>.yml
language: "en"
# Print debug info to console. Keep false on a live server.
debug-mode: false
# Minimum seconds between chunk refreshes for one player.
# Stops refresh spam when someone keeps crossing protection-y.
refresh-cooldown-seconds: 3
# ββ Worlds βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Worlds where underground hiding is active.
# Avoid the Nether and End, they can cause visual glitches.
worlds:
list:
- "world"
# - "survival"
# ββ Protection βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# How the Y levels fit together (defaults):
#
# protection-y 64 At or above this, everything below void-y is hidden.
# deep-deactivation-y 20 Below this, protection is always off.
# void-y 15 Blocks at or below this are what gets hidden.
#
# Between deep-deactivation-y and protection-y, protection turns on only
# when the player looks upward or has an open path up to the surface.
# Rule: void-y < deep-deactivation-y < protection-y
protection:
# Roughly your world's surface height (64 for a normal overworld).
protection-y: 64.0
# How far below protection-y a player must go before protection turns
# off again. Stops flickering when jumping around at the surface.
hysteresis-y: 2.0
# Blocks at or below this Y are hidden. Set it about 5 blocks above
# the highest point of the bases you want to protect.
void-y: 15
# Different void-y per world. Worlds not listed use void-y above.
# per-world-void-y:
# resource_world: 20
# Players below this Y always have protection off.
deep-deactivation-y: 20.0
# Also hide chests, signs, spawners, mobs, items, particles and sounds
# inside hidden areas. Stops the F3 pie chart and ESP mods from
# finding bases. Keep this on.
pie-chart-protection: true
# Smart Fill reveal: how much of the real cave around a player is shown.
# Only used when replacement.smart-fill.enabled is true.
smart-fill:
# Everything within this many blocks of the player is shown as real.
reveal-radius: 28
# Open space in the direction the player is looking is shown as real
# up to this many blocks away.
look-distance: 48
# Seconds an area stays real after the player leaves it, so it doesn't
# flicker when they move back and forth. 0 = switch back instantly.
# Very high values make it easier to scout a base and freecam back later.
recently-revealed-ttl-seconds: 45
# Show caves as far as the player can actually see across them, so big
# caverns don't show a wall of fake stone. Walls still block the view,
# so bases behind them stay hidden.
reveal-line-of-sight: true
# Don't see further than the player's render distance.
reveal-follow-render-distance: true
# Maximum line-of-sight distance in blocks (32-256).
reveal-max-distance-cap: 128
# Blocks checked per player each second for line of sight.
# Lower this if it costs too much server time.
reveal-sight-budget: 60000
# ββ What hidden blocks look like βββββββββββββββββββββββββββββββββββββ
replacement:
# Block shown instead of hidden blocks when Smart Fill is off.
block-type: "air"
# Smart Fill: fill hidden areas with stone, deepslate and ores copied
# from nearby terrain, so they look like normal rock instead of a void.
smart-fill:
enabled: true
# Keep hiding distant caves while players are underground, not only
# while protection is on at the surface.
always-on: true
# Use plain hiding (below void-y) for Bedrock players instead of Smart
# Fill. Smart Fill re-sends chunks as players move, which Bedrock
# (Geyser) shows as glitchy chunk reloads. Needs Geyser or Floodgate.
disable-for-bedrock: true
# Top Y of the area Smart Fill hides. Defaults to protection-y.
# ceiling-y: 64
# How many 16-block layers above and below to copy blocks from (0-4).
sample-radius-sections: 1
# Max different block types used in the fill (2-16).
max-palette-size: 6
# Block used when there is no nearby terrain to copy from.
fallback-block: "stone"
# Small enclosed rooms near the surface (PvP arenas, crystal holes)
# are left alone instead of being filled. Note: a small, low hidden
# room near the surface would be left alone too.
surface-structures:
# Only rooms with their roof at or above this Y.
min-y: 30
# Only rooms at most this many blocks tall (1-32).
max-pocket-height: 10
# ββ Entities βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
entities:
# Hide mobs, item frames, minecarts etc. inside hidden areas
# (mob farms, storage mobs) from protected players.
hide-entities: true
# ββ Notifications ββββββββββββββββββββββββββββββββββββββββββββββββββββ
notifications:
action-bar:
# Show an action bar message while a player is protected.
enabled: false
message-active: "&cβ FreeCam Protected"
# ββ Anti-cheat βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
anti-cheat:
freeze-detection:
# Warn in console when a protected player hasn't moved for this
# many seconds (can mean a position-spoofing freecam).
enabled: false
seconds: 30
# ββ Performance ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
performance:
# Paper/Spigot: max chunks refreshed per tick (1-500).
max-chunks-per-tick: 40
# Folia: max chunks re-sent to one player per tick (1-64). Smart Fill
# refreshes are spread out over ticks so they don't flood the network.
max-chunks-per-player-per-tick: 8
# When a player comes near protection-y, refresh a large radius at once
# so there is no moment where real blocks show.
instant-protection:
enabled: true
force-immediate-refresh: true
# Chunk radius to refresh.
instant-load-radius: 14
# How many blocks above protection-y this starts.
pre-load-distance: 10
# Only refresh chunks within this radius when protection changes.
# Chunks further out can briefly show real blocks until they reload.
# Leave off unless you need the performance.
limited-area:
enabled: false
chunk-radius: 4
# ββ Freecam mod detection ββββββββββββββββββββββββββββββββββββββββββββ
# On join, a hidden anvil opens for a split second to check if the
# player's client has the Freecam mod installed. Only runs once per join.
# Test it with a real Freecam client before using a ban command.
freecam-detection:
enabled: true
# Ticks the hidden anvil stays open (20 ticks = 1 second).
probe-timeout-ticks: 5
# Print debug info about each check to console.
debug: false
# Console commands run when a player is detected, in order.
# Placeholders: %player%, %uuid%, %key%
detected-commands:
- "kick %player% &cFreecam detected"
# - "ban %player% Freecam detected"
# Alert staff with the fpantifreecam.alerts permission and the console.
alerts-enabled: true
alert-message: "&8[&cFPAntiFreecam&8] &e%player% &7was flagged for &cFreecam &7(&8%key%&7)"
π Statistics
π¬ Support
Secure what players shouldn't see.
All Versions
+ Add Version| Name | Game version | Platforms | Published | Downloads | Actions |
|---|---|---|---|---|---|
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 | ||||
| 13h ago | 1 |
- Fixed players sometimes seeing a gap of missing chunks while mining underground with Smart Fill disabled. Walking into it froze the player and made the screen glitch until a relog or /fpac reload.
- Chunks that were hidden while near the surface are now always restored once protection turns off. Any that slip through are repaired automatically within about a second.
- Chunk refresh requests are no longer dropped when protection switches on and off quickly (most noticeable on Folia).
- Fixed a Folia scheduling error that could stop chunk refreshes for a player until they relogged.
- Smart Fill no longer slows down the network or raises ping on busy servers.** Smart Fill refreshes were sent to every nearby player, not just the one who needed them. With many players in the same area, chunk traffic grew far faster than the player count and raised everyone's ping. Each refresh now goes only to the player it's for.
- Folia:** Smart Fill chunk refreshes are now spread over several ticks with a limit per player, instead of being sent in one large burst.
- Paper/Spigot:** The same per-player chunk sending is used here too.
## Added
- New setting
performance.max-chunks-per-player-per-tick(default8, range 1-64) to control how many chunks one player can be sent per tick on Folia. Lower it if the network is still busy, or raise it if caves take too long to appear.
## Notes
- Your config updates automatically to version 5.3. The new setting is added and your existing values stay the same.
- If your server doesn't support per-player chunk sending, the plugin logs one warning and goes back to the old method.
- Invisible mobs:** Fixed mobs sometimes being invisible while still attacking, such as creepers exploding, skeletons shooting or zombies hitting with nothing visible. Seen mostly on Folia.
- Mobs whose spawn was hidden because they spawned below
void-yare now sent to the player again once they move somewhere that shouldn't be hidden. - Mobs hidden while underground are now shown again as soon as they leave the hidden zone, instead of staying hidden until the player's own protection state changed.
- Folia:** Showing or hiding a mob in a different region no longer throws an error and stops the remaining mobs from being shown again. Those mobs are now retried on the next check.
### Notes
- Mobs inside hidden underground areas stay hidden, so base protection works the same as before.
- No config changes.
replacement.smart-fill.disable-for-bedrock** (default:true): Bedrock players (Geyser/Floodgate) now get plain hiding belowvoid-yinstead of Smart Fill. Smart Fill re-sends chunks as players move, and Bedrock shows those re-sends as glitchy chunk reloads. Java players keep Smart Fill. Set this tofalseto give Bedrock players Smart Fill again.
### Notes
- Your
config.ymlupdates itself to version 5.2 and adds the new option without changing your other settings. - Bedrock players are detected through Geyser or Floodgate. If Geyser runs on a proxy, install Floodgate on the backend server too.
- Bedrock (Geyser/Floodgate):** Fixed chunks constantly reloading for Bedrock players every 1β2 seconds when Smart Fill was enabled. The world would flash between empty ground and half-loaded terrain with floating trees.
### Improvements
- Smart Fill:** The plugin now remembers which chunks were sent to each player with hidden blocks in them. It only re-sends a chunk when the player has moved or turned enough to reveal something new. This also cuts unnecessary chunk traffic and server load for Java players.
- Chunk records are cleared automatically when a chunk unloads on the client, and on respawn, world change, quit, or when Smart Fill turns off for the player.
### Fixes
- Folia:** Fixed the
Thread failed main thread check: Accessing entity state off owning region's threaderror that appeared in console every 60 seconds during cache cleanup. - Folia:** Entity hider cleanup now checks each entity on the thread that owns it. Stale entries for despawned or removed entities are cleared just as on Paper and Spigot.
### Improvements
- Paper/Folia:** The plugin now removes entities from its internal cache the moment they leave the world, instead of scanning every world every 60 seconds. Spigot still uses the periodic scan.
- Fixed chunks sometimes not loading for Bedrock players.** The plugin was re-sending too many chunks at once, and Bedrock clients (via Geyser) were dropping some of them. Bedrock players now get far fewer chunk re-sends: Smart Fill updates are rate-limited for them, and refreshes never go beyond their view distance.
- Fixed outdated chunks at the edge of Bedrock players' view.** The outermost ring of chunks is now refreshed properly when protection changes.
- Fixed Bedrock detection breaking after
/fpac reload.** - Clearer startup message** when Geyser/Floodgate isn't found. If Geyser runs on a proxy (BungeeCord/Velocity), install Floodgate on the backend server too so Bedrock players are recognised.
## General fixes
- Fewer duplicate chunk re-sends for everyone.** If a chunk is already waiting to be refreshed, it's no longer added again. This lowers server and network load on both Paper and Folia.
- Fixed some caves staying hidden in large caverns.** When too many newly visible chunks appeared at once, the extras were skipped and never updated. They're now refreshed over the next few seconds.
## Note
Bedrock players may see hidden caves turn into real blocks a few seconds later than Java players. Java players aren't affected.
Smart Fill now reveals caves based on what you can actually see. Once a second, the plugin casts rays from your eyes and reveals every cave section they pass through, out to your render distance (or
reveal-max-distance-cap, default 128 blocks). Large caverns are now revealed across their full width instead of ending in a wall of fake stone partway across.Walls and corners still block the view, so bases behind them stay hidden. The close-range reveal around you still works as before.
- Config** (
protection.smart-fill): reveal-line-of-sight: turn the ray sweep on or off (defaulttrue)reveal-follow-render-distance: limit the sweep to your render distance (defaulttrue)reveal-max-distance-cap: hard cap in blocks, 32 to 256 (default128)reveal-sight-budget: max blocks checked per player per second (default60000)
## π§© Compatibility
- Supports **Paper, Folia, Purpur and Spigot, 1.19 β 26.3**.
- Spigot support fixed**: the plugin used to crash on plain Spigot. It now
- Chunk refreshes use the server's view distance instead of each player's.
/fpac statsshows TPS as N/A.- Freecam mod detection is turned off, because it needs Paper.
- Requires **PacketEvents 2.11.0 or newer**. Use the PacketEvents version that
## π Bug fixes
- Sounds, particles and mob/item spawns in hidden areas now follow
pie-chart-protection and Smart Fill's reveal, so you can hear and seethem in your own cave again.
- Fixed some block sounds being hidden or shown based on the wrong position.
pie-chart-protection: falsenow also stops hiding chest/sign/spawner data.raycastno longer turns off Smart Fill's look-direction reveal.- Fixed freeze detection never triggering.
- Fixed entities staying hidden after turning
hide-entitiesoff and reloading. performance.max-chunks-per-tickis now actually used.- Smart Fill reveal settings now load on startup instead of only after a reload.
## π§Ή Config cleanup
config.ymlis reorganized, with shorter and clearer comments.- Removed the
protection.raycastsection. It now uses fixed, tuned values. - Freecam detection's translation keys are now built in.
- Removed the unused
folia-optimizationsoption. - Removed keys are deleted from existing configs automatically on update;
- Config version 5.1.** For the new clean comments, delete
plugins/FPAntiFreeCam/config.yml and let it regenerate.- Entity Hider: minecarts & chest minecarts were never hidden.** Bukkit fires
VehicleCreateEvent(notEntitySpawnEvent) when a player places a minecart, boat, or chest/hopper/TNT/furnace/spawner minecart. Since Entity Hider only listened forEntitySpawnEvent, any minecart placed underground while protection was active was left fully visible. Added aVehicleCreateEventlistener so all vehicle types are now caught and hidden correctly.
### Removed
- Removed the unused
/fpac freecamtestmanual-probe command and its leftover code/help entry. Automatic join-time Freecam detection is unaffected.
- Freecam mod detection: probes players once on join with known Freecam-mod translation keys via a hidden anvil GUI, comparing what the client echoes back against the mod's real lang file. Fully configurable under freecam-detection in config.yml, including which translation keys to check and which command(s) to run on detection (kick by default, placeholders for player, uuid, and matched key).
- Staff alerts: new fpantifreecam.alerts permission. Anyone holding it gets an in-game alert plus a console log line whenever a player is flagged, similar to an anticheat's alert feed.
- pie-chart-protection now defaults to enabled, closing the F3 pie-chart exploit for locating chests, spawners, and bases through the void. Previously opt-in.
# π Bug Fixes
- Fixed the void-hiding radius under-scoping on servers with a per-world view distance higher than the global server.properties default. Bukkit.getViewDistance() ignored Paper's per-world override, leaving a ring of real, unmasked terrain visible just outside the refresh radius.
- Fixed a memory leak in ChunkListener where every spawned mob, item, XP orb, and painting added an entry to an internal cache that was never removed, even after despawning. Entity removal is now tracked via a periodic sweep and the cache is also cleared on disable/reload.
- Fixed a crash on server shutdown (IllegalPluginAccessException) caused by scheduler calls made after the plugin was already marked disabled.
- Fixed a related shutdown crash (Plugin cannot be disabled) from attempting to hide/show entities during onDisable(), which Bukkit refuses outright regardless of threading.
- Fixed the jar requiring Java 21 to even load, which broke it entirely on real 1.19.x/1.20.x servers (those run on Java 17). Lowered the compile target to 17, no loss of functionality.
- Fixed the Freecam probe item occasionally leaking into a player's inventory when the hidden anvil GUI auto-closed.
# π§ Improvements
- Freecam detection no longer periodically re-probes players while they're online. It only probes once, on join, since popping the anvil GUI mid-session was interrupting active PVP by hijacking left-click input.
- Bedrock players (via Geyser/Floodgate) are now excluded from Freecam probing entirely; Freecam mods are Java Edition only and can't exist on Bedrock.
- lang/*.yml now auto-merges new message keys on a config-version bump, the same mechanism config.yml already used.
- Cleaned up config.yml comments across the board for readability, no keys or default values changed.
Freecam detection now only probes once, on join, instead of repeating every probe-interval-seconds. Periodic re-probing was popping the hidden anvil GUI mid-session, which hijacks left-click input and was interrupting active PVP. This isn't just disabled by default anymore, it's removed entirely from the code, there's no toggle to bring back the old always-on behavior. A player who installs Freecam mid-session won't be caught until their next join, or via /fpac freecamtest on demand.
Shortened probe-timeout-ticks default from 20 to 5, so even the one-time join probe is a much briefer flash.
Cleaned up config.yml comments across the board: removed decorative dividers, replaced dense inline notes with plain readable sentences. No keys or default values changed, this is comment/formatting only.
This update introduces significant stability improvements, memory leak fixes, cleaner shutdown handling, and Bedrock/Geyser integration improvements for the Freecam detection engine.
- Fixed Shutdown Scheduler Crashes (
IllegalPluginAccessException)**: - Handled Bukkit's internal lifecycle restriction where
BukkitSchedulerrejects task registrations once disabling starts. Shutdown tasks now execute inline cleanly on both Paper and Folia region schedulers. - Fixed
EntityHiderDisable Warnings**: - Guarded
hideEntity/showEntitycalls during server shutdown to preventCraftPlayerdisabled-plugin warnings. - Fixed Memory Leak in
entityYCache**: - Entities (mobs, items, orbs) registered in the Y-cache are now periodically pruned every 60 seconds against active world entities, preventing unbounded RAM growth on long-running servers with mob farms.
- Preserved Backwards-Compatibility for 1.19.4+**:
- Refactored cache cleanup to avoid relying on newer Paper-only removal events, ensuring 100% compatibility across Paper 1.19.4 through 1.21.x+.
- Geyser / Floodgate Compatibility**:
- Bedrock players connecting through Geyser/Floodgate are now automatically identified and skipped by the translation-key probe engine to prevent unnecessary GUI packet flashes on Bedrock clients.
- Entity Status & Diagnostics**:
- Added entity cache statistics to
/fpafc statusfor easier monitoring by server administrators.
Fixed a crash on server shutdown (IllegalPluginAccessException) caused by EntityHider trying to reschedule entity-visibility tasks after the plugin had already been marked as disabled. Scheduling calls made during shutdown now run immediately instead of being queued, so /stop and plugin reloads no longer log an error.
- Freecam detection | probes players with known Freecam-mod translation keys via a hidden anvil GUI and compares what the client echoes back. Runs on join and on a periodic sweep, independent of worlds.list.
- Staff alerts | new fpantifreecam.alerts permission. Anyone holding it gets an in-game alert plus a console log line on every detection, similar to an anticheat's alert feed.
- /fpac freecamtest <player> β manually fires a probe on demand for testing, bypassing the normal interval/cooldown. (FOR ALPHA ONLY)
- Detection keys and the kick command are fully configurable under freecam-detection in config.yml.
- Bumped config-version to 4.4
# π§ Improvements
- pie-chart-protection now defaults to true, closing the F3 pie-chart exploit for locating chests/spawners/bases through the void (previously opt-in).
- lang/*.yml now auto-merges new message keys on a config-version bump, the same mechanism config.yml already used.
# β οΈ Alpha Notice
This is the first release of the detection system. It relies on client behavior (auto-echoing an anvil rename field) that hasn't been verified across every Freecam-family fork or Minecraft version. Report false positives/negatives on Discord or GitHub Issues.
- [Folia] Entity hiding now actually works on Folia** β On Folia servers,
hideEntity()/showEntity()calls were silently failing due to region-thread ownership violations. The plugin was scheduling visibility tasks on the region that owns the *spawned entity*, then attempting to mutate every online player's state from that thread β which Folia correctly rejects. The exceptions were being swallowed silently (logged at.fine(), invisible by default), making it appear as if "nothing happened." Entity hiding is now dispatched through Folia'sEntityScheduleron a per-player basis, which always runs on the correct region thread for that player regardless of where they are in the world.
- [Folia] Entity hiding after teleport now scans the correct location** β
entityHider.updateFor()was being called *before*teleportAsync()completed, causing it to check for nearby entities around the player's *pre-teleport* position. Entities near the teleport destination were never hidden. The call is now correctly placed inside thewhenCompletecallback, after the teleport has landed.
- [Folia] Entities now re-show correctly when protection deactivates** β
entityHider.updateFor()was only invoked when arming protection (going underground), not when disarming (coming back up or dismounting a vehicle below protectionY). This caused entities hidden by EntityHider to remain invisible until an unrelated state change happened to trigger an update. Both arm and disarm paths now callupdateFor().
- Hide/show failures are now visible in console** β
hideEntity()andshowEntity()errors were previously logged at.fine()(suppressed by default), masking failures entirely. They are now logged at.warning()level so server admins can see if something goes wrong.
- Fixed
invalid bit length repeatpacket corruption / client disconnects** β Previously, FPAntiFreeCam bundled its own copy of PacketEvents alongside standalone PacketEvents on the server. This created duplicatePacketEventsEncoderinstances in the Netty pipeline, corrupting large chunk compression streams (especially while swimming or rapidly loading chunks). - PacketEvents is now a required external dependency** β FPAntiFreeCam no longer bundles PacketEvents. This fixes the Netty pipeline conflict and reduces the plugin JAR size from **5.1 MB down to 61 KB**.
β οΈ **Important:** You must have the [PacketEvents](https://modrinth.com/plugin/packetevents) plugin installed on your server for FPAntiFreeCam to start.
- Fixed Folia crash:
AsyncCatchererror onChunk getEntities call** β TheENTITY_SOUND_EFFECTpacket handler was callingworld.getEntities()on the Netty IO thread, which Folia blocks. Replaced with a thread-safe entity position cache that requires zero Bukkit API calls on the network thread. - Fixed Folia raycast thread-safety violation** β The raycast task was running on the
GlobalRegionSchedulerwhile accessing world block data across different region threads. Each player's raycast is now scheduled on their owning region thread.
## β‘ Performance Improvements
- Early packet-type filtering** β The packet listener now checks the packet type *before* any Bukkit API calls. Previously,
Bukkit.getPlayer(),player.getWorld(),player.hasPermission(), andplayer.getGameMode()were executed for **every single outbound packet** (chat, tab list, keep-alive, etc.) β even though we only handle ~10 specific packet types. This eliminates unnecessary overhead for ~90% of all outbound packets. - Bypass permission caching** β
player.hasPermission()andplayer.getGameMode()are no longer called on the Netty IO thread. A thread-safe bypass cache is updated on the main thread during player join, quit, world change, gamemode change, and/fpac bypass, so the packet handler only performs a fast map lookup. - Cached reflection calls** β All scheduler reflection in
PlatformUtil(getMethod,invoke) is now resolved once at class load instead of on every scheduler call. The tile entity reflection field in the chunk handler is also cached statically. - Reduced debug logging overhead** β Debug string concatenation in the hot packet path is now properly guarded and only runs when debug mode is actually enabled.
## π¦ Housekeeping
- Bumped config version to
4.2
- Teleport crash:**
onPlayerTeleportcalled the blockingEntity#teleport()from inside a Folia region-scheduled task, which always throwsUnsupportedOperationException: Must use teleportAsync while in region threading. The player was never moved and protection silently failed to apply/lift. Switched toteleportAsync(), with the follow-up state update correctly bounced back onto the owning region thread. - Entity-hiding crash risk:**
EntityHider(active by default viaentities.hide-entities: true) scheduled its hide/show/spawn-hook logic on the *global* region scheduler instead of the region that actually owns the entity/player. Same failure class as the teleport bug β now routed through the region-aware scheduler. - Update-notification crash risk:** the "notify already-online admins of a new version" path called the raw, legacy
Bukkit.getScheduler().runTask(), which Folia rejects outright. Triggered whenever an update is detected while an admin is already online (e.g. right after/fpac reload). Now uses the Folia-safe scheduler wrapper like the rest of the plugin.
### π Fixed (config correctness)
protection.pie-chart-protectionhad no effect β tile-entity stripping (CHUNK_DATA) and entity-spawn packet cancellation ran unconditionally regardless of the setting. Both now correctly respect it.
### π§ Config
config-versionbumped to4.1to ensure the migration path runs cleanly on upgrade for all existing installs.
Fixed Plugin not able to check for updates (HTTP 404 error)
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!
- Layer 1 logic system was inverted, they are now fixed.
- Two-layer underground detection system** β replaces the old single raycast zone
- Layer 1 β Hard floor** (
deep-deactivation-y, default Y=20): if a player's
exceptions. Fixes the Y=16 void bug and trial chamber weirdness entirely.
- Layer 2 β Raycast zone** (between
deep-deactivation-yandsurface-y):
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.
(
fpantifreecam.admin) are notified. New admins are also notified on join.Toggle via
settings.update-checker: true/false.## βοΈ Config
- Added
protection.deep-deactivation-y: 20.0β the absolute Y floor below which
- 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).
- Fixed protection not working for most surface players** β a broken
effectiveVoidY
between Y=15β47, making bases fully visible. Underground blocks are now always hidden
correctly at the configured
void-y.- Fixed raycast and move handler fighting each other** β when a player dipped just below
surface-y, onPlayerMove would 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
system owned the state. Both now use feet-Y consistently.
- Fixed raycast overshoot** β the vertical ray was cast
surfaceY - eyeY + 2.0blocks,
## β¨ New
- Raycast deactivation debounce** β protection now waits a configurable delay before
Configurable via
protection.raycast.deactivation-debounce-ms (default: 500).## βοΈ Config
- Added
protection.raycast.deactivation-debounce-ms: 500β existing configs are
- 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.
- 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.