▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Плагины/AntiAFKPlus
AntiAFKPlus

AntiAFKPlus

Smart and configurable AFK management for your server!

1.2K
3
Все версииComplete Folia 1.21.8 Compatibility

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 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-2.4.2.jar(3.37 MiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

2.4.2

Загрузчики

Bukkit
Folia
Paper
Purpur
Spigot

Версии игры

1.16–1.21.8

Загрузок

19

Дата публикации

5 мес. назад

Загрузил

ID версии

Главная