Tags
Creators
Details
2.4.2
Compatibility
Changes
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.
Error Stack:
Failed to schedule Folia repeating task: io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler.runAtFixedRate
Module system initialization failed: Cannot schedule repeating task on Folia without working scheduler
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
TimeUnitparameter and timing in ticks directly (no ms conversion)
🛡️ Stronger Fallback
- Always create a
ScheduledExecutorServicefallback before reflection - Graceful degradation if native Folia API fails
- Dedicated daemon thread pool for fallback operations
⚡ Additional API Fixes
- Adjusted
runDelayedandrunsignatures for single-execution tasks - Corrected
RegionSchedulerandEntitySchedulerparameter 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
- Download AntiAFKPlus v2.4.2
- Replace the old JAR in
/plugins - Restart the server
- No configuration changes required
- On Folia, verify the log: “✅ Folia support initialized successfully”
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:b4AUi0VN:9axlLSNY"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:b4AUi0VN:9axlLSNY"
}

