Links
Tags
Creators
Details
Licensed MIT
Published 3 weeks ago
Updated last week
All versions
1.0.2
Release
AnarchySpawn 1.0.23 weeks ago 7
Compatibility
Minecraft: Java Edition
26.3
26.2
26.1.x
1.21.x
1.20.x
1.19.x
1.18.x
1.17.x
1.16.x
Platforms
Bukkit
Folia
Paper
Purpur
Spigot
Changes
[1.0.2] - 2026-10-03
Added
- Native Folia Server Compatibility (Single-JAR Dual Compatibility):
- Added the
FoliaSchedulerunified scheduler abstraction layer, which reflectively probesBukkit.getRegionizedScheduler()to auto-detect the Folia runtime; all scheduling calls across the project are now funneled through this layer with zeroif-elsebranching in business code; - Provides five semantic scheduling entry points:
runForPlayer/runForPlayerLater(player's owning region thread),runForRegion(world's owning region thread),runTimerGlobal(global repeating task), andrunAsync(pure background task); - On non-Folia environments (Paper / Purpur / Spigot / CraftBukkit) it automatically falls back to the original classic scheduler path, behaving exactly like 1.0.1 with zero regression risk;
- The startup log now reports the runtime mode (
Folia (Regionized Scheduler)orPaper/Spigot (Classic Scheduler)) so operators can confirm the active scheduling mode.
- Added the
Changed
- Full migration of scheduler calls to
FoliaScheduler(15 call sites in total):PlayerJoinListener: first-join delayed teleport now uses the player region thread scheduler;PlayerRespawnListener: post-respawn effects, fallback random teleport, and cache pool refill (4 call sites) migrated;PlayerWorldChangeListener: cross-world first-join delayed task migrated;TeleportService: cached-point teleport, async search callback, post-respawn effects, and spawn protection countdown (5 call sites) migrated, and the ineffectiveBukkit.isPrimaryThread()check insideensureMainThread()removed;LocationCachePool: background cache refill timer migrated to the global region scheduler;SafeLocationFinder: safe-column evaluation after async chunk load migrated to the world region thread scheduler;AnarchySpawnCommand:/as tp,/as setcenter, and/as test(3 call sites) migrated.
PaperCompatibilityfallback path refactor:- Removed the ineffective
Bukkit.isPrimaryThread()checks from thegetChunkAtAsyncandteleportPlayerAsyncfallback branches; - Chunk loading fallback now uniformly uses
FoliaScheduler.runForRegion, and teleport fallback uniformly usesFoliaScheduler.runForPlayer, satisfying both Folia thread confinement and the Spigot/Paper main-thread requirement.
- Removed the ineffective
- Thread-safety refactor of
TeleportService.cancelAllProtectionTasks(): on plugin disable,setInvulnerable(false)for online players is now dispatched to each player's owning region thread, eliminating cross-thread access violations.
Fixed
- Fixed
UnsupportedOperationExceptionand thread confinement violations on Folia caused by using the classic Bukkit scheduler (runTask/runTaskLater/runTaskAsynchronously/runTaskTimerAsynchronously); - Fixed abnormal chunk loading and teleport fallback paths on Folia caused by the ineffective
Bukkit.isPrimaryThread()semantics. - Folia scheduler reflection signature fix (critical):
- Corrected the erroneous Folia scheduler API signature assumption in the
FoliaSchedulerstatic probe block. The previous implementation probedRegionScheduler#runTaskTimer(Plugin, Runnable, long, long), which does not exist on Folia'sRegionScheduler(global repeating tasks belong toGlobalRegionScheduler), causing aNoSuchMethodExceptionthat disabled the entire Folia detection and fell back to the classic scheduler unsupported on Folia, resulting in runtime crashes; - Now split into four schedulers resolved independently via reflection:
EntityScheduler(player region thread),RegionScheduler(world region thread),GlobalRegionScheduler(global repeating tasks), andAsyncScheduler(pure background tasks); - Each reflective handle is resolved in its own try/catch, so a single missing method no longer disables the whole Folia detection; Folia is only assumed when
RegionSchedulerresolves successfully.
- Corrected the erroneous Folia scheduler API signature assumption in the
runAsync()argument fix: the previous implementation incorrectly invokedRegionScheduler#runTask(Plugin, World, Runnable)while omitting theWorldargument, then fell back torunTaskAsynchronouslywhich is unsupported on Folia. Now usesAsyncScheduler#runNow(Plugin, Consumer).runTimerGlobal()semantic fix: the previous implementation usedRegionSchedulerfor global repeating tasks; now usesGlobalRegionScheduler#runAtFixedRate(Plugin, Runnable, long, long).runForPlayer()/runForPlayerLater()signature fix: now useEntityScheduler#run(Plugin, Runnable, Runnable)andrunDelayed(Plugin, Runnable, Runnable, long).runForRegion()signature fix: now usesRegionScheduler#run(Plugin, World, int, int, Runnable).LocationCachePoolthread-confinement fix:refillAllWorlds()previously iterated worlds and read world data directly on the global scheduler thread, violating Folia's thread confinement. Each world's cache refill is now dispatched to its owning region thread viaFoliaScheduler.runForRegion()(newrefillWorld()method).- Corrected the Maven compiler plugin comment in
pom.xmlfrom "Java 17 support" to "Java 21 support" to match the actualjava.version=21. - Added an
api-versionexplanatory comment inplugin.ymlclarifying the compile baseline and runtime compatibility range. FoliaSchedulersafe-degradation fix: when a reflective Folia handle failed to resolve, the methods previously fell back to the classic Bukkit scheduler, which throwsUnsupportedOperationExceptionon Folia. Every entry point now degrades to another Folia scheduler (runForRegion→ global,runForPlayer→ region,runForPlayerLater→ global delayed,runTimerGlobal→ async,runAsync→ global) and never touches the classic scheduler on a Folia runtime.GlobalRegionSchedulerone-shot support: added reflective resolution ofrun(Plugin, Runnable)andrunDelayed(Plugin, Runnable, long)so one-shot global tasks (used by the safe-degradation paths) can be scheduled;runTimerGlobalnow distinguishes repeating (period > 0) from one-shot (period <= 0) tasks.LocationCachePoolrefill-guard fix: theisRefillingguard was released before the per-world region tasks actually ran, allowing overlapping refill rounds to overfill the cache queues. The guard now covers the whole dispatch window (released on the next tick on Folia), and the per-world in-flight counters throttle concurrent searches.TeleportServicestale-cache fix: a cached location whose world is no longer loaded is now discarded before teleporting, preventing a failedteleportAsyncon an unloaded world.PlayerRespawnListenerstale-cache fix: a cached respawn point whose world is unloaded is now discarded, avoiding a synchronous chunk load on the main thread during the respawn event.SafeLocationFindersync-path thread fix: whenasync-searchis disabled, the synchronous search is now dispatched throughFoliaScheduler.runForRegioninstead of running inline, so it is safe when invoked from an async thread (e.g. the cache pool) and respects Folia thread confinement.MessageManagerlist[noprefix]fix: the list branch ofsendMessagenow honours the[noprefix]marker, matching the single-line branch behaviour.
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:JF6wPJrE:l1IAVx8y"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:JF6wPJrE:l1IAVx8y"
}

