AntiAFKPlus icon

AntiAFKPlus -----

Smart and configurable AFK management for your server!



Complete Folia 1.21.8 Compatibility
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”
----------, Sep 10, 2025
Resource Information
Author:
----------
Total Downloads: 287
First Release: Apr 29, 2025
Last Update: Sep 11, 2025
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings