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

AnarchySpawn

A high-performance random wilderness spawn and safe respawn engine designed for Anarchy and SMP Minecraft servers.

Оцените первым
120
1
Все версии→AnarchySpawn 1.0.2

AnarchySpawn 1.0.2

Release04.10.2026

Список изменений

[1.0.2] - 2026-10-03

Added

  • Native Folia Server Compatibility (Single-JAR Dual Compatibility):
    • Added the FoliaScheduler unified scheduler abstraction layer, which reflectively probes Bukkit.getRegionizedScheduler() to auto-detect the Folia runtime; all scheduling calls across the project are now funneled through this layer with zero if-else branching 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), and runAsync (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) or Paper/Spigot (Classic Scheduler)) so operators can confirm the active scheduling mode.

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 ineffective Bukkit.isPrimaryThread() check inside ensureMainThread() 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.
  • PaperCompatibility fallback path refactor:
    • Removed the ineffective Bukkit.isPrimaryThread() checks from the getChunkAtAsync and teleportPlayerAsync fallback branches;
    • Chunk loading fallback now uniformly uses FoliaScheduler.runForRegion, and teleport fallback uniformly uses FoliaScheduler.runForPlayer, satisfying both Folia thread confinement and the Spigot/Paper main-thread requirement.
  • 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 UnsupportedOperationException and 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 FoliaScheduler static probe block. The previous implementation probed RegionScheduler#runTaskTimer(Plugin, Runnable, long, long), which does not exist on Folia's RegionScheduler (global repeating tasks belong to GlobalRegionScheduler), causing a NoSuchMethodException that 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), and AsyncScheduler (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 RegionScheduler resolves successfully.
  • runAsync() argument fix: the previous implementation incorrectly invoked RegionScheduler#runTask(Plugin, World, Runnable) while omitting the World argument, then fell back to runTaskAsynchronously which is unsupported on Folia. Now uses AsyncScheduler#runNow(Plugin, Consumer).
  • runTimerGlobal() semantic fix: the previous implementation used RegionScheduler for global repeating tasks; now uses GlobalRegionScheduler#runAtFixedRate(Plugin, Runnable, long, long).
  • runForPlayer() / runForPlayerLater() signature fix: now use EntityScheduler#run(Plugin, Runnable, Runnable) and runDelayed(Plugin, Runnable, Runnable, long).
  • runForRegion() signature fix: now uses RegionScheduler#run(Plugin, World, int, int, Runnable).
  • LocationCachePool thread-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 via FoliaScheduler.runForRegion() (new refillWorld() method).
  • Corrected the Maven compiler plugin comment in pom.xml from "Java 17 support" to "Java 21 support" to match the actual java.version=21.
  • Added an api-version explanatory comment in plugin.yml clarifying the compile baseline and runtime compatibility range.
  • FoliaScheduler safe-degradation fix: when a reflective Folia handle failed to resolve, the methods previously fell back to the classic Bukkit scheduler, which throws UnsupportedOperationException on 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.
  • GlobalRegionScheduler one-shot support: added reflective resolution of run(Plugin, Runnable) and runDelayed(Plugin, Runnable, long) so one-shot global tasks (used by the safe-degradation paths) can be scheduled; runTimerGlobal now distinguishes repeating (period > 0) from one-shot (period <= 0) tasks.
  • LocationCachePool refill-guard fix: the isRefilling guard 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.
  • TeleportService stale-cache fix: a cached location whose world is no longer loaded is now discarded before teleporting, preventing a failed teleportAsync on an unloaded world.
  • PlayerRespawnListener stale-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.
  • SafeLocationFinder sync-path thread fix: when async-search is disabled, the synchronous search is now dispatched through FoliaScheduler.runForRegion instead of running inline, so it is safe when invoked from an async thread (e.g. the cache pool) and respects Folia thread confinement.
  • MessageManager list [noprefix] fix: the list branch of sendMessage now honours the [noprefix] marker, matching the single-line branch behaviour.

Файлы

AnarchySpawn-1.0.2.jar(86.17 KiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

1.0.2

Загрузчики

Bukkit
Folia
Paper
Purpur
Spigot

Версии игры

1.16–26.3

Загрузок

7

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

04.10.2026

Загрузил

ID версии

Главная