Skip to content

IPDynamic v2.0.3 - Folia Support, Memory Leak Prevention & Fairy-Library Audit

Latest

Choose a tag to compare

@SrCodexStudio SrCodexStudio released this 03 May 17:45
99a0864

Folia Support

IPDynamic is now fully compatible with Folia (Paper's multi-threaded regionized server). A single JAR works across Paper, Spigot, Purpur, and Folia
without separate builds.

  • Runtime detection of Folia via SchedulerHelper that automatically routes scheduler calls to the correct API
  • All Bukkit.getScheduler() calls replaced with Folia-safe alternatives: getAsyncScheduler(), getGlobalRegionScheduler(), and entity.getScheduler()
  • Player kicks dispatched on the entity's region thread via runOnEntity() instead of the global main thread
  • Removed MCCoroutine Bukkit dispatcher dependency entirely. All coroutines now run on a plugin-owned CoroutineScope(SupervisorJob() + Dispatchers.IO)
    that is properly cancelled on disable
  • Added folia-supported: true to plugin.yml

Memory Leak Prevention (Fairy-Library Audit)

Comprehensive audit against fairy-library best practices for long-running servers (weeks/months uptime).

  • onDisable() now performs a complete 6-step shutdown: coroutine join, task cancellation, listener unregistration, rate monitor reset, cache clearing, and
    database pool closure in strict dependency order
  • Coroutine scope uses cancelAndJoin() instead of fire-and-forget cancel() to prevent interrupted database writes and SQLite WAL corruption
  • Added clearCaches() methods to BanService, WhitelistService, and CountryService for proper heap release on disable
  • GeoIP cache now runs periodic cleanup every 5 minutes to evict expired entries instead of only cleaning on new insertions
  • All scheduled Bukkit tasks are explicitly cancelled on disable via server.scheduler.cancelTasks()
  • All event listeners are unregistered on disable via HandlerList.unregisterAll()
  • Zero GlobalScope usage across the entire codebase. All async work is tied to the plugin lifecycle

Compatibility

┌────────────────────┬───────────┐
│ Platform │ Status │
├────────────────────┼───────────┤
│ Paper 1.17 - 1.21 │ Supported │
├────────────────────┼───────────┤
│ Spigot 1.17 - 1.21 │ Supported │
├────────────────────┼───────────┤
│ Purpur 1.17 - 1.21 │ Supported │
├────────────────────┼───────────┤
│ Folia │ Supported │
├────────────────────┼───────────┤
│ Floodgate / Geyser │ Supported │
├────────────────────┼───────────┤
│ Java 17+ │ Required │
└────────────────────┴───────────┘