Complete Folia 1.21.8 Compatibility
Release5 мес. назад
Список изменений
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”
Файлы
antiafkplus-2.4.2.jar(3.37 MiB)
ОсновнойМетаданные
Канал релиза
Release
Номер версии
2.4.2
Загрузчики
BukkitFoliaPaperPurpurSpigot
Версии игры
1.16–1.21.8
Загрузок
19
Дата публикации
5 мес. назад

