You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spawn v1.4.0 — Minor Performance and Stability Issues Fixxed
Performance Improvements
Sound Caching
Sound lookups (Registry.SOUNDS + NamespacedKey parsing) are now cached in a ConcurrentHashMap<String, Optional<Sound>> via computeIfAbsent()
Previously, every countdown tick per player triggered a full Registry lookup
Invalid/empty sound names are also cached to avoid repeated parse attempts
Cache is automatically cleared on /spawnreload
Display Name Caching
Tab-completion display names are now cached in a volatile List<String>
instead of re-sorting the entire map on every keystroke
Cache is invalidated automatically on setSpawn() / deleteSpawn()
Stability Improvements
Async DB Error Handling
dbExecutor.execute() tasks for save() and delete() are now wrapped in try-catch(Exception) with full stack trace logging via log.log(Level.SEVERE, ..., e)
Previously, any RuntimeException thrown in async DB tasks was silently
swallowed by the ExecutorService
Memory Leak Fixes
UpdateChecker Lifecycle Management
HttpClient and ExecutorService converted from static fields to instance
fields with proper shutdown() method
shutdown() is called from SpawnPlugin.onDisable() before SpawnManager shutdown
Fixes: ClassLoader/thread leak on plugin reload — static threads and
HttpClient previously survived class unloading
Sound Cache Cleanup
SoundUtil.clearCache() called on both /spawnreload and plugin disable
Code Safety
Abstract Read Methods in AbstractLocationManager
exists(), getNames(), getDisplayNames(), getLocation(), getDisplayName()
are now abstract instead of concrete DB-query implementations
Forces subclasses to provide cache-backed implementations
Prevents: Accidental synchronous DB access on main/region thread
(MSPT spikes, Folia threading violations)