AntiAFKPlus v3.1.1 — Changelog
Bug Fixes
Server idling below 20 TPS even with all modules disabled — Critical
With the plugin enabled, servers dropped to ~17-18 TPS (with low MSPT) and a spark profile showed the server thread parked. It happened regardless of which modules were turned on.
EssentialsX (and similar AFK plugins) conflict — High
- Root cause: the performance optimizer compared the whole JVM heap usage against a 50 MB budget — always true on a real server — and forced a full System.gc() every 5 seconds. Each forced GC is a stop-the-world pause that breaks tick timing.
- Fix: the periodic forced GC has been removed. Memory cleanup now runs only under genuine heap pressure (used heap above 90% of the JVM max). CPU usage is also measured correctly now, so it no longer triggers spurious internal adjustments. No config change needed.
Players typing /afk were immediately unmarked as AFK a few seconds later with the message "X is no longer AFK", even without touching the keyboard or mouse. This still happened on the first 3.1.1 build; it is now fully resolved.
Door spam-click bypass — Critical
- Root cause: EssentialsX (and any plugin with an AFK teleport feature) processes /afk independently and teleports the player to its own AFK zone. The teleport — and the landing/gravity movement right after it — was counted as real player activity, immediately cancelling the manual AFK state.
- Fix: when a plugin teleports a player who went manually AFK within the last 15 seconds, neither the teleport nor the brief movement that follows it unmarks them. After the 15-second grace period, plugin teleports count as normal activity. No config change needed.
- Recommended config action: Disable EssentialsX's /afk in its config to avoid dual handling:
YAML:# EssentialsX config.yml disabled-commands: - afk
Then configure teleportation in AntiAFKPlus instead (afk-action.type: TELEPORT or zone-management).
Repeatedly right-clicking a door (manually or via auto-clicker / Minecraft accessibility toggle) reset the AFK timer indefinitely. Noteblock, gate, and lever were correctly detected; the door was the sole exception.
Two concurrent bugs:
No config change needed.
- Face alternation: a door's clickable face changes when it opens (panel rotates 90°). The passive-repeat filter compared faces exactly, so each click was treated as a new action. Fix: doors and trapdoors now use a face-agnostic comparison. Two-tall door clicks are normalized to the bottom half.
- Air clicks through the open door: after the door opens, the auto-click lands on air. Fix: air clicks are suppressed when the player has not moved since the last door toggle. The same suppression applies to clicks on blocks within 2 blocks of the door (the "block behind the open door" scenario) but not beyond, so functional blocks farther away are never affected.
AFK warning title/subtitle shows wrong countdown — Medium
The title overlay sent during AFK warnings (warning-subtitle-standard) displayed the configured threshold (e.g. 60, 30, 10) instead of the actual seconds remaining, identical to the chat message bug fixed in v3.1. Only the subtitle was affected; the chat message was already corrected.
AFK warnings not reset after world change — Low
- Fix: {seconds} in the subtitle now uses secondsRemaining (actual time left). No config change needed.
Players who received AFK warnings before switching to a disabled or non-enabled world still had those warnings recorded. On returning to a monitored world, the same warnings never fired again for that session.
Blank lines in chat when language messages are set to "" — Medium
- Fix: pending warnings are cleared whenever a player enters a disabled or non-enabled world, regardless of whether they were already marked AFK. No config change needed.
Setting Bedrock-related messages to "" in the language file (bedrock-detected, bedrock-tip-mobile, bedrock-tip-console, bedrock-tip-desktop) caused a blank chat line for Bedrock players on join instead of silence.
- Fix: all Bedrock welcome and tip messages now check for null/empty before sending. Setting any of these keys to "" correctly suppresses the message. No config change needed.
How to Update
- Stop the server.
- Replace the plugin JAR with AntiAFKPlus-3.1.1.jar.
- Start the server — no config changes required unless noted above.
It is very important that you update to version 3.1, as it corrects bugs that could cause the plugin to malfunction.
AntiAFKPlus v3.1 — Changelog
Bug Fixes
- Console spam from activity logs — [Activity] log lines no longer appear in the console by default. They only show when debug: true is set in config.yml. Core AFK messages (player went AFK, returned, kicked) always appear regardless.
- Blank chat lines when a message is set to "" — Setting any message to an empty string in the language file no longer sends a blank line to the player's chat. It is silently skipped.
- AFK pool bypass via water current — Players inside a water AFK pool could avoid detection indefinitely because water current movement was counted as real activity. Fixed: only manual input (swimming, looking around, jumping, sprinting) counts as activity.
- Door spam-click bypass — Repeatedly clicking a door (manually or with an auto-clicker) was resetting the AFK timer indefinitely. Fixed.
- "Use Item: toggle" bypass on levers and buttons — Holding right-click on levers or buttons prevented AFK detection. Fixed.
- "Attack/Destroy: toggle" bypass on cobblestone generators — Holding left-click on a cobble generator prevented AFK detection indefinitely. Fixed.
- "No longer AFK" broadcast missing or delayed — When a player returned from AFK by sending a chat message, the server broadcast frequently never appeared. It now fires immediately.
- AFK warning messages showed wrong countdown value — The "you will be kicked in {seconds}s" warning displayed the configured threshold instead of the actual time remaining. Fixed.
- AFK warnings not reset after world change — Players who received warnings and then moved to a disabled world would not receive them again on returning. Fixed.
- GUI shift+click did not decrease numeric values — In the settings GUI, shift-clicking was supposed to decrease a value but always increased it instead. Fixed.
- Large AFK pool detection not working — Players in pools larger than 5×5 blocks were never detected even with the feature enabled. Fixed.
- GAMEMODE and COMMAND actions ignored in global AFK action — Setting afk-action.type: GAMEMODE or COMMAND silently fell through to a kick. Both actions now work correctly. GAMEMODE reads afk-action.gamemode; COMMAND reads afk-action.command with {player} / {uuid} support.
Config / Connectivity Fixes
- database.enabled ignored by SQL storage — SQL storage now activates correctly when either database.enabled or credit-system.database.enabled is true.
- DiscordSRV pattern alerts never fired — With integrations.discordsrv.send-pattern-alerts: true, a Discord message is now sent when a suspicious pattern is detected, including the player name, pattern type, and confidence level.
- performance.adaptive-intervals had no effect on the AFK check task — The option now correctly adjusts the AFK check interval based on server TPS.
New Features
Reward system (reward-system) — now functional
- Tracks AFK time and fires configured reward-system.intervals.* thresholds once per AFK session.
- Respects require-active-time-minutes, max-daily-rewards, and require-vault.
- Executes console commands and sends player messages. Supports {player} and {uuid} placeholders.
Analytics system (analytics) — now functional
- Enable with analytics.enabled: true in config.yml.
- Automatic daily reports generated at midnight in JSON or CSV format (set via analytics.export-format). Files are saved to plugins/AntiAFKPlus/analytics/.
- New commands:
- /afkplus analytics — shows a live in-memory summary.
- /afkplus analytics export — forces an immediate export.
- Permission required: antiafkplus.stats.
Hologram support — DecentHolograms and FancyHolograms
- A floating hologram appears above AFK players when visual-effects.holograms.enabled: true.
- Auto-detects DecentHolograms first, then FancyHolograms. If neither is installed, holograms are simply disabled.
- Text lines, height offset, and update interval are all configurable under visual-effects.holograms.* in config.yml.
- Supports {player} and {time} placeholders (e.g. &eAFK for {time}).
Bedrock / GUI adaptation (Geyser/Floodgate)
- Player-facing messages and GUI menus now adapt automatically when a player is connected from Bedrock Edition via Geyser or Floodgate.
Compatibility
- Paper 1.16 — 26.1.2+
- Folia (all versions)
- Spigot 1.16+
- Purpur, Pufferfish, and other Paper forks
- Bedrock via Geyser/Floodgate
- PlaceholderAPI
- DecentHolograms (optional)
- FancyHolograms (optional)
Migration
Drop-in update — no changes required, except for the two notes below.
What changed Action required enabled-worlds default is now [] (all worlds) If you relied on the old default, add your world names explicitly or leave the list empty to keep "all worlds" behaviour repetitive-movement-threshold default lowered to 0.82 Only relevant if you set this manually; otherwise no action needed 10 new language keys under analytics.* Custom translation files will fall back to English until updated
How to Update
- Stop the server.
- Replace the plugin JAR with AntiAFKPlus-3.1.jar.
- Start the server.
AntiAFKPlus v3.0.4 — Changelog
Performance
Reduced load on the server main thread
Problem: On servers with many players and active timers, the plugin could contribute to small TPS dips (for example, TPS hovering around 19 instead of a steady 20). Profiling tools (like spark) showed AntiAFKPlus as one of the points where the server was spending time waiting, even though CPU usage looked low.
Cause: An internal check the plugin ran on every scheduled task to know whether the server was paused. That check, repeated many times per second, produced small stalls that, added up, affected TPS.
Fix: The check was rewritten so that:
Expected result: More stable TPS and a much smaller footprint in profiling reports, especially on servers with high concurrency, the credit system enabled, particles, or multiple worlds.
- It only really runs once per tick, no matter how many tasks are active.
- It is skipped entirely on platforms where it does not apply (Spigot and forks without Paper's pause API). On those, the cost is now literally zero.
No visible plugin behavior was modified: AFK detection, punishments, messages, and commands work exactly the same.
Compatibility
- Paper 1.16 — 1.21+
- Folia (all versions)
- Spigot 1.16+
- Purpur, Pufferfish, and other Paper forks
- Bedrock via Geyser/Floodgate (unchanged)
- PlaceholderAPI (unchanged)
No action required.
Migration
Players currently in AFK state when the server restarts will keep their usual behavior.
- No changes to config.yml.
- No changes to language files (languages/*.yml).
- No changes to permissions.
- No changes to the public API.
How to Update
That's it.
- Stop the server.
- Replace the plugin JAR with AntiAFKPlus-3.0.4.jar.
- Start the server.
AntiAFKPlus v3.0.3 — Changelog
Bug Fixes
Players bypass AFK detection by riding animals in water (Critical)
Problem: A player sitting on any rideable entity (horse, donkey, camel, boat, etc.) in water could completely avoid AFK punishments. The natural bobbing motion of the animal in water was incorrectly counted as player activity, causing the plugin to immediately unmark the player as AFK — even though the PatternDetector had correctly identified them as idle.
Symptoms:
Fix: The plugin now correctly identifies passive vehicle movement and ignores it as activity. Players mounted on entities will only be considered active if they move their camera (mouse input), which requires real player interaction. Pattern detection continues monitoring mounted players normally.
- Console shows pattern violations accumulating normally (repetitive_movement, keystroke_timeout)
- Player gets marked as AFK at the correct threshold
- Player is immediately unmarked (~1 second later) with reason "manual (API activity/unmark)"
- This loop repeats indefinitely — the player is never actually punished
Affected setups: All servers, but especially those using MARK_AFK_ONLY as the AFK action. Servers using KICK or TELEPORT were less impacted since those actions execute before the next movement tick.
Blank lines in chat when AFK state messages are set to empty
Problem: Setting player-now-afk: "" or player-no-longer-afk: "" in the language file to disable AFK state broadcasts still sent blank lines to all online players.
Fix: The plugin now checks if the message is empty or whitespace-only before broadcasting. Setting either message to "" will now completely suppress it — no blank lines, no chat spam.
Language file changes not applied on /afkplus reload
Problem: Editing language YAML files (e.g., plugins/AntiAFKPlus/languages/en.yml) required a full server restart to take effect. The /afkplus reload command only reloaded config.yml but not the language files.
Fix: /afkplus reload now also reloads all language files. Changes to messages, translations, and custom text take effect immediately without restarting.
Improvements
Renamed max-voluntary-afk-time-seconds → max-afk-duration-seconds
The old name was confusing because it also applies to players marked AFK by the plugin (via MARK_AFK_ONLY), not just voluntary /afk usage.
New config key:
YAML:# Maximum seconds a player can remain in AFK state before being forced active. # Applies to both voluntary (/afk) and plugin-marked (MARK_AFK_ONLY) AFK states. # Set to 0 to disable (players stay AFK indefinitely until they move). max-afk-duration-seconds: 600
The old key max-voluntary-afk-time-seconds still works for backward compatibility — no migration needed.
Compatibility
- Paper 1.16 — 26.1.2+
- Folia (all versions)
- Spigot 1.16+
- Purpur, Pufferfish, and other Paper forks
- No config changes required
How to Update
No config changes required. The old max-voluntary-afk-time-seconds key still works.
- Stop the server
- Replace the plugin JAR with AntiAFKPlus-3.0.3.jar
- Start the server
Optional: Rename max-voluntary-afk-time-seconds to max-afk-duration-seconds in your config.yml for clarity. Both keys are supported.
AntiAFKPlus v3.0.2 — Changelog
New Features
Global AFK Action (afk-action)
Configure what happens when a player goes AFK directly in config.yml — no zone management or WorldGuard needed.
YAML:afk-action: type: "TELEPORT" teleport-location: "world,250,76,30"
Available actions: KICK, TELEPORT, MARK_AFK_ONLY, NONE
Exempt Worlds (afk-action.exempt-worlds)
Worlds where players get marked as AFK (tab list prefix, visual effects) but are not teleported or kicked. Perfect for spawn worlds.
YAML:afk-action: type: "TELEPORT" teleport-location: "world,250,76,30" exempt-worlds: - "world_spawn"
Players in world_spawn will show as AFK in tab but won't be teleported. Players in other worlds will be teleported normally.
Hex Color Support
Language files and messages now support hex colors (1.16+):
Example in your language file:
- &#e5be01 format
- {#e5be01} format
- #e5be01 format
YAML:kick-action-teleport: "&#e5be01[Server] &fYou have been teleported."
Bug Fixes
Messages always in English on first startup (Critical)
The ConfigManager loaded messages before the LocalizationManager was initialized, so all cached messages (kick warning, AFK state, teleport) defaulted to English. Even after restart, the cached values stayed in English. Fixed: Messages are now reloaded after the localization system is ready.
Players kicked even with TELEPORT configured
Custom zone names (e.g., spawn_final, lobby) were ignored — only "spawn" worked. Now any zone name works.
Zone management required WorldGuard for simple setups
require-worldguard defaulted to true. Now defaults to false.
Warning times showed wrong numbers (29 instead of 30)
Warnings now display the exact configured time (30, 10, 5) instead of the calculated remainder that varied with the check interval.
Warning titles on screen always in English
The on-screen title ("⚠ AFK Warning") was hardcoded. Now reads from your language file (warning-title-standard, warning-subtitle-standard).
Teleport message always in English
Hardcoded. Now reads kick-action-teleport from your language file.
Pattern detection warnings in English
Hardcoded. Now reads suspicious-activity and pattern-violation-kicked from your language file.
Bedrock welcome messages in English
Hardcoded. Now reads from language file (bedrock-detected, bedrock-tip-mobile, bedrock-tip-console, bedrock-tip-desktop).
Language files incomplete
All 10 languages now fully translated. No English leftovers.
Improvements
- Config documentation with inline examples for afk-action and zone-management
- Startup validation warns about misconfigured teleport locations
- Action priority: Zone Management > Global afk-action > Server Transfer > KICK
How to Update
- Replace the plugin JAR
- Delete plugins/AntiAFKPlus/languages/ so new translated files are extracted
- Restart the server
- Add to your config.yml:
YAML:afk-action: type: "TELEPORT" teleport-location: "world,250,76,30" exempt-worlds: - "world_spawn"
Note: Back up your language files if you customized them. Re-apply changes after the new files are extracted.
Fix Show [AFK] in tab list via PlaceholderAPI:
Then use %antiafkplus_status% in your tab/chat plugin (TAB, LuckPerms, etc.).
