Tags
Creators
Details
2.8.1
Compatibility
Changes
AntiAFKPlus v2.8.1 - Critical Threading Fix
Release Date: 2025-10-20 Type: Bugfix Release Compatibility: Paper 1.21.8, Spigot, Folia, Purpur (MC 1.16-1.21.8)
š§ Critical Fixes
Pattern Detection Event Threading (Paper 1.21.8 Compatibility)
Issue: Pattern detection events were being fired asynchronously, causing IllegalStateException on Paper 1.21.8 and preventing external API listeners from receiving events.
Fixed:
- ā All Bukkit events now fire synchronously on main thread (Paper 1.21.8 requirement)
- ā
Eliminated async entity access (
player.getLocation()now called in main thread) - ā Converted internal data structures to thread-safe collections (ConcurrentHashMap/ConcurrentLinkedDeque)
- ā Implemented atomic operations for violation counters to prevent race conditions
- ā Added proper player disconnect handling during async analysis
Impact:
- External plugins using
api.registerPatternDetectionListener()now receive events correctly - Zero threading exceptions in Paper 1.21.8+
- Maintained performance (heavy analysis still runs asynchronously)
Files Changed:
PatternDetector.java- Complete threading model refactor
š Performance
- ā Zero performance regression - Pattern analysis remains asynchronous
- ā Thread-safe operations - All concurrent access properly synchronized
- ā
Folia compatible - Uses
runTaskForEntityfor player-specific operations
š API Compatibility
Fully compatible with v2.8 API - No breaking changes for developers.
Developers can now safely use:
AntiAFKPlusAPI api = AntiAFKPlusAPI.getInstance();
api.registerPatternDetectionListener(event -> {
// This now works correctly on Paper 1.21.8+
System.out.println("Pattern detected: " + event.getPattern().getType());
});
š¦ Installation
Maven:
<dependency>
<groupId>com.github.koyere</groupId>
<artifactId>AntiAFKPlus</artifactId>
<version>2.8.1</version>
<scope>provided</scope>
</dependency>
Gradle:
compileOnly 'com.github.koyere:AntiAFKPlus:2.8.1'
š Known Issues
None reported in this release.
š Notes for Server Admins
- Direct upgrade from v2.8 - No configuration changes required
- Drop-in replacement - Simply replace the JAR file and restart
- No data migration needed
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:NltbutpM"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:b4AUi0VN:NltbutpM"
}

