AntiAFKPlus v2.9.5

Smart and configurable AFK management for your server!
AntiAFKPlus v2.8 — API Overhaul

Release type: Feature & API Upgrade Compatibility: Minecraft 1.16 – 1.21.10 | Java 17+

What's New

📊 Real Data Everywhere
Activity, history, and statistics endpoints now return live server data.
getActivityInfo, getActivityStatistics, getAFKStatistics, getPlayerStatistics, and getAFKHistory consume the internal tracking system (no more placeholders).

🚦 Reliable Events
AFK warnings and pattern detections are always delivered to the public API.
Listeners (registerWarningListener, registerPatternDetectionListener) can modify messages or cancel actions before the plugin kicks/teleports players.

🗺️ Zone Awareness
New helpers (isAFKAllowedAt, getAFKZoneAt) resolve zone-management settings and WorldGuard regions on the fly.
Worlds can be toggled at runtime with setAFKDetectionEnabled, persisting the change to config.yml.

⚙️ Ease of Use
README/API docs include updated examples for the new endpoints (activity, zones, stats).
API version bumped to 2.8, ready for your integrations.

Upgrade Notes
Replace the old JAR with AntiAFKPlus v2.8.
Update your dependency to 2.8 (Maven/Gradle snippet in the README).
Review the new API examples and adjust your listeners if you want to react to warnings/patterns.

No configuration changes are required. Everything works with your existing config.yml / messages.yml.
v2.7.1 - Thread Safety Fix

Fixed ConcurrentModificationException in PatternDetector.detectPendulumPattern() that caused random crashes during pattern analysis. Added defensive list copying for thread-safe movement history access, improving reliability of the AFK event system.
AntiAFKPlus v2.7 — Critical Bug Fixes

Release type: Bug Fix Release Compatibility: Minecraft 1.16 – 1.21.9+ | Java 17+

What's Fixed

1. Credit System Teleportation (CRITICAL FIX)
- Problem: AFK zone teleportation worked only 1-2 times, then stopped working. Players would see AFK warnings but never get teleported.

- Solution: Fixed credit system logic to properly teleport players when credits are exhausted.

What this means for you:
✅ AFK zone teleportation now works consistently every time
✅ Credits consume properly minute-by-minute while AFK
✅ Players are automatically teleported when credits reach zero
✅ No more "stuck" players who see warnings but never get moved

2. Disabled Worlds Cleanup (CRITICAL FIX)

- Problem: Players still received AFK warnings in disabled worlds, even when those worlds were added to disabled-worlds configuration.

- Solution: Plugin now completely clears AFK state when players enter disabled worlds.

What this means for you:
✅ No more AFK warnings in disabled worlds
✅ AFK state is automatically cleared when entering disabled worlds
✅ Works correctly with both disabled-worlds and enabled-worlds configuration
✅ Players can safely AFK in designated worlds without interference
Pattern Detection Errors (TECHNICAL FIX)

Problem: Server logs showed ConcurrentModificationException errors during pattern analysis.

Solution: Implemented thread-safe pattern detection across all detection methods.

What this means for you:
✅ Clean server logs without errors
✅ Pattern detection (water circles, large pools, confined spaces) works flawlessly
✅ Better server stability and performance
✅ No more error spam in console

3. ⚙️ Credit System Isolation (ENHANCEMENT)
- Problem: Credit system could potentially interfere with standard AFK detection even when disabled.

- Solution: Complete isolation of credit system when disabled in configuration.

What this means for you:
✅ Zero performance overhead when credit system is disabled
✅ Standard AFK detection works perfectly without credit system
✅ Full backwards compatibility with previous configurations
✅ Better resource efficiency

Configuration Examples
- Fix #1: Enable AFK Zone Teleportation with Credits

modules:
credit-system:
enabled: true
credit-system:
enabled: true
afk-zone:
enabled: true
world: "world"
location: "0,100,0"

- Fix #2: Disable AFK Detection in Specific Worlds

disabled-worlds:
- "luna-afk-1"
- "creative-world"
- "lobby"

Upgrade Instructions
  • Backup your current config.yml and messages.yml
  • Replace old plugin JAR with AntiAFKPlus v2.7
  • Restart your server
  • Test AFK teleportation and disabled worlds functionality
  • No configuration changes required - all fixes are automatic!

> For Server Owners
Critical Fixes:
  • AFK zone teleportation now reliable and consistent
  • Disabled worlds work as expected (no more false warnings)
  • Eliminated concurrent modification errors in logs
  • Credit system properly isolated when disabled

> Performance:
  • Thread-safe operations throughout pattern detection
  • Reduced resource usage when credit system is disabled
  • Cleaner logs and better stability

> Compatibility:
  • 100% backwards compatible with v2.6 and v2.5 configurations
  • No breaking changes
  • All existing features continue to work normally

> Need Help?

Version: 2.7 Release Date: October 12, 2025 Type: Critical Bug Fix Release
AntiAFKPlus v2.6 — Server Transfer & Scripted Sequences

Release type: Feature Release​
Compatibility: Minecraft 1.16 – 1.21.8+ | Java 17+​

What’s New

Server Transfer (Bungee/Velocity)
  • Native final action TRANSFER_SERVER to move AFK players to another server via Plugin Messaging.
  • Global configuration with robust channel handling and optional retry policy.
  • Zone-based overrides: per-zone transfer with kick-action: TRANSFER and transfer-server.

Countdown & Titles/Sounds
  • Optional per-second countdown with Title/Subtitle and Sound before transferring.
  • Fully Folia-safe with entity-bound scheduling.
  • Auto-cancels if the player becomes active.

Scripted Action Pipeline
  • New pipeline engine to run steps in order: TITLE, SUBTITLE, SOUND, MESSAGE, WAIT, TRANSFER.
  • Configurable in config.yml with simple DSL-like syntax.
  • Cancels automatically when leaving AFK.

Robustness & Fallbacks
  • Auto-registration of BungeeCord and bungeecord:main channels.
  • Channel selection: auto | bungeecord | namespaced.
  • Fallback actions: KICK | TELEPORT | NONE with optional teleport location.

How It Works (Action Order)
  1. Credit System: If credits exist, the kick event is cancelled and credits are consumed; no transfer runs.
  2. Zone Management: Zone kick-action takes priority (TELEPORT, TRANSFER, etc.).
  3. Global Transfer: If enabled and a target-server is configured, TRANSFER_SERVER is used by default.

If the player becomes active mid-flow, any countdown/pipeline is cancelled.

Configuration

Global settings:
YAML:
server-transfer:
  enabled: true
  target-server: "lobby"
  proxy-channel: "auto"        # auto | bungeecord | namespaced

  # Fallbacks
  fallback-action: "KICK"      # KICK | TELEPORT | NONE
  fallback-teleport-location: "world,0,100,0"

  # Retry policy
  retry-attempts: 0
  retry-delay-ticks: 10

  # Countdown
  countdown:
    enabled: false
    seconds: 10
    title: "&cYou are AFK"
    subtitle: "&eMoving in {seconds}s"
    sound:
      enabled: true
      name: "ENTITY_EXPERIENCE_ORB_PICKUP"
      volume: 1.0
      pitch: 1.0

  # Scripted pipeline
  pipeline:
    enabled: false
  actions:
    - "TITLE: &cYou are AFK"
    - "SUBTITLE: &eMoving in {seconds}s"
    - "SOUND: ENTITY_EXPERIENCE_ORB_PICKUP,1.0,1.0"
    - "WAIT: 1s"
    - "MESSAGE: &7Transferring..."
    - "TRANSFER: lobby"

Zone-based transfer example:
YAML:
zone-management:
  enabled: true
  zones:
    spawn:
      kick-action: "TRANSFER"
      transfer-server: "lobby"

Messages
Add or customize in messages.yml:
YAML:
messages:
  server-transfer:
    transferring: "&7[AntiAFK+] &aTransferring you to &f{server}&a..."
    unavailable: "&7[AntiAFK+] &cServer transfer unavailable."
    failed: "&7[AntiAFK+] &cCould not transfer you."

Permissions & Commands
No new commands or permissions in v2.6. The feature is fully configurable via config.yml.

Compatibility & Notes
  • BungeeCord and Velocity (Bungee compatibility) via Plugin Messaging.
  • Folia-safe scheduling through PlatformScheduler; no BukkitScheduler in Folia context.
  • Fully backward compatible; disabled by default.

Migration
  • No breaking changes. Existing configurations remain valid.
  • To enable: set server-transfer.enabled: true and configure target-server.

Testing Checklist
  • Validate transfer on Bungee/Velocity with correct target-server names.
  • Try countdown and pipeline separately.
  • Confirm fallback behavior (KICK/TELEPORT/NONE) when channels are unavailable.
  • Verify zone-based TRANSFER overrides global behavior.
AntiAFKPlus v2.5 — Release Notes

🎯 AFK Credit System - Earn Time to Be Away

New Feature Overview

Revolutionary AFK Credit System
: Players can now earn AFK time by being active! For every X minutes of active gameplay, players earn Y minutes of AFK allowance before being teleported to a designated AFK zone.

What’s New
1. AFK Credit Earning System

  • Players earn AFK credits by being actively engaged in gameplay
  • Configurable credit ratios based on permissions (default: 5 minutes active = 1 minute AFK credit)
  • Real-time credit accumulation tracking with activity validation
  • Maximum credit limits to prevent indefinite accumulation
2. Credit-Based AFK Protection
  • When a player goes AFK, the system first consumes available credits
  • Credits provide immunity from immediate kick/teleportation
  • Once credits are exhausted, player is teleported to designated AFK zone
  • Smooth transition from credit consumption to zone teleportation
AFK Credit System
  • Earn credits while active; consume credits to delay AFK action.
  • Teleport to AFK zone when credits are exhausted; /afkback returns you.
WorldGuard Integration
  • Zones resolved from regions (reflection, no hard dependency).
  • Teleport priority: zones.afk → zones.spawn → credit-system.afk-zone.
AFK Zone Protection
  • Optional damage/PVP/mob-spawn protections near the AFK zone.
SQL History (Optional)
  • Track earn/consume/admin/decay transactions when SQL is enabled.
New Placeholder
  • %antiafkplus_credits_expire_days% — days until credits expire.

How It Works
  1. Active players earn credits (ratio-based) up to a configurable cap.
  2. When AFK is detected, 1 credit/minute is consumed to delay the action.
  3. At 0 credits, the player is teleported to the AFK zone; /afkback returns them.
Configuration (added)

YAML:
modules:
  credit-system:
    enabled: false
credit-system:
  enabled: false
  credit-ratios:
    default: "5:1"
    vip: "4:1"
    premium: "3:1"
    admin: "2:1"
  max-credits:
    default: 120
    vip: 180
    premium: 240
    admin: 480
  earning-requirements:
    minimum-session-minutes: 5
    activity-threshold: 0.3
  afk-zone:
    enabled: true
    world: "world"
    location: "0,100,0"
  notifications:
    credit-earned: true
    credit-consumed: true
    credit-exhausted: true
  return-command:
    enabled: true
    cooldown-seconds: 10

Messages (added)


YAML:
messages:
  credit-system:
    earned: "&a+ &f{minutes}m &7AFK credits earned! &8(&f{total}m &7total)"
    consuming-start: "&eUsing AFK credits to delay action..."
    consumed: "&c- &f{minutes}m &7AFK credits used &8(&f{remaining}m &7left)"
    exhausted: "&c❌ &7AFK credits exhausted. You will be moved."
    zone-teleport: "&7[AntiAFK+] &aTeleported to AFK zone."
    errors:
      invalid-location: "&7[AntiAFK+] &cInvalid AFK zone location configured."

Permissions (declared)
  • antiafkplus.credit.earn — earn credits (default true)
  • antiafkplus.credit.use — use credits to delay AFK action (default true)
  • antiafkplus.credit.ratio.vip|premium|admin — improved ratios (default false/op)
  • antiafkplus.credit.admin — full credit administration
Execution Flow
  1. Active player earns credits according to ratio and limits.
  2. On AFK, if credits available → cancel action and consume 1/min.
  3. On activity → stop consumption (no teleport).
  4. On exhaustion → teleport to AFK zone (zone‑management if present; fallback to credit-system.afk-zone).
Compatibility & Performance
  • Folia‑safe (no BukkitScheduler in Folia context).
  • No changes to AFKManager loop (event‑driven).
  • Earning: one global job/min; consumption: per‑player task while AFK with balance.
  • Respects antiafkplus.bypass.


🎯 Credit System Logic Flow

1. Credit Earning Process:


Player Active (5 minutes) → Activity Validation → Credit Calculation → Credit Award

Activity Score Check → Pattern Detection → Anti-Abuse Validation → Credit Storage

2. AFK Detection with Credits:

Player Goes AFK → Check Credit Balance → Has Credits?

Yes: Consume Credits → Continue Monitoring

No: Save Location → Teleport to AFK Zone → Enable Return Command

3. Return Process:

Player Uses /afkback → Validate in AFK Zone → Check Original Location Safety

Safe: Teleport Back → Clear AFK Status → Success Message

Unsafe: Teleport to Spawn → Warning Message

✅ Benefits and Features

Player Benefits:

  • Earn AFK Time: Active gameplay is rewarded with AFK allowance
  • Flexible AFK: No immediate kicks, gradual credit consumption
  • Safe Return: Always able to return to original location
  • Transparent System: Clear feedback on credit earning and consumption
Server Owner Benefits:
  • Configurable Ratios: Adjust credit earning rates by permission groups
  • Abuse Prevention: Anti-pattern detection during credit earning
  • Zone Management: Designated safe AFK areas
  • Database Support: Optional persistent credit storage
Technical Benefits:
  • Modular Design: Integrates seamlessly with existing module system
  • Performance Optimized: Minimal impact on server performance
  • API Complete: Full programmatic access for other plugins
  • Event System: Comprehensive events for custom integrations
🔄 Integration Points

Existing System Integration:

  • AFKManager: Credit verification before actions
  • PatternDetector: Anti-abuse during credit earning
  • ModuleManager: Full module lifecycle support
  • PlaceholderAPI: Credit balance and status placeholders
  • Reward System: Bonus credits through reward intervals
  • Zone Management: AFK zone configuration and management
🧪 Testing Scenarios

Core Functionality Tests:

  1. Credit Earning: Verify active play generates credits at correct ratios
  2. Credit Consumption: Confirm AFK periods consume credits properly
  3. Zone Teleportation: Test teleport when credits exhausted
  4. Return Command: Validate return to original location
  5. Permission Integration: Test different ratios by permission groups
Edge Case Testing:
  1. Location Safety: Handle unsafe original locations
  2. World Changes: Manage cross-world teleportation
  3. Server Restart: Verify credit persistence (if database enabled)
  4. Concurrent Usage: Test multiple players earning/using credits
  5. Configuration Reload: Ensure system adapts to config changes
Compatibility
  • Minecraft: 1.16 - 1.21.8+ (unchanged)
  • Java: 17+ (unchanged)
  • Platforms: Paper, Spigot, Bukkit, Purpur, Folia (full compatibility)
  • Dependencies: None required, Vault optional for database features
Migration and Upgrade
Automatic Migration:

  • Existing configurations remain unchanged
  • Credit system starts disabled by default
  • No breaking changes to existing functionality
  • Seamless integration with current AFK detection
Manual Configuration:
  • Server owners must enable credit-system.enabled: true
  • Configure AFK zone location
  • Adjust credit ratios for permission groups
  • Customize messages and notifications

Version: 2.5
Release Date: 11/09/2025
Compatibility: Minecraft 1.16 - 1.21.8+
Java: 17+
AntiAFKPlus v2.4.2 Changelog

Complete Folia 1.21.8 Compatibility

Problem Resolved
Issue
: The plugin failed to initialize on Folia 1.21.8 with UnsupportedOperationException (due to BukkitScheduler usage) and reflection errors in runAtFixedRate.

Root Cause: PlatformScheduler was using incorrect method signatures for Folia's GlobalRegionScheduler API, causing reflection failures during task scheduling.

Technical Solution Implemented

Correct Folia Method Signatures

  • Before: runAtFixedRate(plugin.getClass(), Consumer.class, long.class, long.class, TimeUnit.class)
  • After: runAtFixedRate(Plugin.class, Consumer.class, long.class, long.class)
  • Key: no TimeUnit parameter and timing in ticks directly (no ms conversion)
️ Stronger Fallback
  • Always create a ScheduledExecutorService fallback before reflection
  • Graceful degradation if native Folia API fails
  • Dedicated daemon thread pool for fallback operations
⚡ Additional API Fixes
  • Adjusted runDelayed and run signatures for single-execution tasks
  • Corrected RegionScheduler and EntityScheduler parameter types
  • Consistent use of Consumer<ScheduledTask>
What’s Fixed
  • ✅ Full Folia 1.21.8 compatibility: initializes and runs correctly
  • ✅ No UnsupportedOperationException: removed BukkitScheduler usage in Folia context
  • ✅ Timers and tasks migrated to PlatformScheduler: pattern analysis, detectors and checks operational
  • ✅ Commands and AFK detection working
  • ✅ Zero impact on other servers: Paper, Spigot, Bukkit, Purpur unchanged
Compatibility
  • Paper/Spigot/Bukkit: ✅ unchanged, functionality preserved
  • Purpur: ✅ compatible via Paper base
  • Folia 1.21.8+: ✅ complete native support with correct API usage
Version: 2.4.2
Release Date: 2025-09-09
Compatibility: Minecraft 1.16 - 1.21.8
Java: 17+

Upgrade Instructions
  1. Download AntiAFKPlus v2.4.2
  2. Replace the old JAR in /plugins
  3. Restart the server
  4. No configuration changes required
  5. On Folia, verify the log: “✅ Folia support initialized successfully”
AntiAFKPlus v2.4.1 Changelog

🐛 Critical Bug Fix

Issue Resolved
Problem
: Players were being kicked/teleported repeatedly every 5 seconds instead of only once after reaching the AFK timeout threshold.

Root Cause: The AFK check task was calling the kick/teleport action repeatedly during each check interval (every 5 seconds) instead of executing it only once per AFK session.

Solution Implemented
🔧 Technical Fix

  • Added action state tracking to prevent repeated kick/teleport actions for the same AFK session
  • Implemented safety delay to prevent immediate actions upon AFK detection
  • Added automatic cleanup of action state when players become active again
  • Maintained full compatibility with all existing features and API
✅ Result
  • Players are now kicked/teleported only once after reaching their AFK timeout
  • AFK timeout configurations (like default-afk-time: 600) now work correctly
  • All other plugin functionality remains unchanged and fully operational

Version: 2.4.1
Release Date: 2025-09-06
Type: Critical Bug Fix
Compatibility: Minecraft 1.16 - 1.21.8 Java: 17+

Upgrade Notes
  • No configuration changes required
  • Fully backward compatible
  • Simply replace the JAR file and restart your server

AntiAFKPlus v2.4 Changelog​


🎯 Large AFK Pool Detection Enhancement​

Problem Identified​

Issue: Players were bypassing AFK detection by creating large AFK pools (20x10+ blocks) that circumvented existing detection systems.

Root Cause:
  • Current detection focused on small confined spaces (≤5x5 blocks) and water circles (≤3 block radius)
  • Large pools allowed players to move naturally via water currents without manual input
  • System detected movement but couldn't distinguish between manual keystrokes and automatic water current movement

Solution Implemented​

🔧 New Detection Features​


1. Keystroke Timeout Detection
  • Added detection for players who don't provide manual keyboard input for extended periods
  • Distinguishes between manual WASD movement and automatic water current movement
  • Configurable timeout threshold (default: 3 minutes)
2. Large AFK Pool Pattern Recognition
  • Expanded detection to identify pools between 5x5 and 25x25 blocks
  • Analyzes movement patterns to identify water current automation
  • Multi-factor validation prevents false positives
3. Enhanced Movement Analysis
  • Velocity analysis to detect consistent water current speeds
  • Direction change analysis to identify artificial vs natural movement
  • Automatic vs manual movement classification

📋 Technical Changes​


Files Modified:
  • MovementListener.java: Added keystroke detection and movement analysis
  • PatternDetector.java: Implemented large pool detection algorithms
  • config.yml: Added configuration options for new detection methods
New Configuration Options:
YAML:
pattern-detection-settings:
large-pool-threshold: 25.0  # Maximum area for large AFK pools
keystroke-timeout-ms: 180000  # 3 minutes without manual input
automatic-movement-velocity-threshold: 0.15  # Water current detection

🎮 Detection Logic​

Large AFK Pool Detection Criteria:
  1. Movement area > 5x5 but < 25x25 blocks
  2. Player in water for extended periods
  3. Movement patterns consistent with water currents
  4. No manual keystrokes detected for 3+ minutes
Only triggers AFK when ALL criteria are met, ensuring legitimate gameplay is not affected.

✅ Benefits​

  • Closes bypass loophole: Large AFK pools (20x10+) are now detected effectively
  • Maintains accuracy: Multi-factor validation prevents false positives
  • Configurable: Server owners can adjust thresholds based on their needs
  • Performance optimized: Minimal impact on server performance
  • Backward compatible: All existing detection methods remain unchanged

Version: 2.4
Release Date: 2025-08-07
Compatibility: Minecraft 1.16 - 1.21.8 Java: 17+
EULA: Free EULA
2,158 Views
24 Downloads
Apr 30, 2025 Published
Apr 5, 2026 Updated
Not yet rated
3.5 MB File size
Open source
  1. Yes
DRM-free
  1. Yes
Unobfuscated
  1. Yes
Game mode
  1. Survival & SMP
  1. Factions
  1. Minigame
Type
  1. Gameplay
Game mode
  1. Survival
  1. Factions
  1. Minigame
Game mode (legacy)
  1. Survival
  1. Factions
  1. Minigame
Supported software
  1. Spigot
  1. Paper
Supported versions
  1. 1.16
  1. 1.17
  1. 1.18
  1. 1.19
  1. 1.20
  1. 1.21
Supported languages
  1. English
  1. Spanish
Includes DRM
No
Source access (legacy)
Open source
Creator
Recommended for you
Protect your storage with ease and secure, powerful, and lightweight
Not yet rated
3 purchases
Smart and configurable AFK management for your server!
Not yet rated
2 purchases
Pets That Think, Feel, and Live
Not yet rated
2 purchases
Animate heads, armor stands & entities rotations, body poses, particles, holograms & click actions
Not yet rated
0 purchases
#1 BuiltByBit Plugin ~ Protects your server from crash packet exploits ~ Folia Support
5.00 star(s) 141 ratings
4,206 purchases
2,158 Views
24 Downloads
Apr 30, 2025 Published
Apr 5, 2026 Updated
Not yet rated
3.5 MB File size
Open source
  1. Yes
DRM-free
  1. Yes
Unobfuscated
  1. Yes
Game mode
  1. Survival & SMP
  1. Factions
  1. Minigame
Type
  1. Gameplay
Game mode
  1. Survival
  1. Factions
  1. Minigame
Game mode (legacy)
  1. Survival
  1. Factions
  1. Minigame
Supported software
  1. Spigot
  1. Paper
Supported versions
  1. 1.16
  1. 1.17
  1. 1.18
  1. 1.19
  1. 1.20
  1. 1.21
Supported languages
  1. English
  1. Spanish
Includes DRM
No
Source access (legacy)
Open source
Creator
Recommended for you
Protect your storage with ease and secure, powerful, and lightweight
Not yet rated
3 purchases
Smart and configurable AFK management for your server!
Not yet rated
2 purchases
Pets That Think, Feel, and Live
Not yet rated
2 purchases
Animate heads, armor stands & entities rotations, body poses, particles, holograms & click actions
Not yet rated
0 purchases
#1 BuiltByBit Plugin ~ Protects your server from crash packet exploits ~ Folia Support
5.00 star(s) 141 ratings
4,206 purchases
Top