Skip to content

v1.3.0 — Performance & Modernization Update

Choose a tag to compare

@040Elias 040Elias released this 04 Apr 16:52

Spawn v1.3.0 — Performance & Modernization Update

Performance

  • Spawn lookups are now instant (O(1)) — all reads served from an in-memory
    ConcurrentHashMap cache instead of hitting the database.
  • Async database writes — setting or deleting spawns no longer blocks the
    main server thread.
  • Bulk-load at startup — all spawns are loaded into cache once during
    plugin initialization.

Reliability

  • Fixed shutdown order — SpawnManager now flushes pending writes before the
    database connection is closed.
  • Null-safety — world references are validated before saving locations,
    preventing potential NPEs.
  • Spawn name validation — names are now validated against
    ^[a-zA-Z0-9_-]{1,32}$ to prevent invalid entries.
  • Proper interrupt handling in UpdateChecker — no more swallowed
    InterruptedExceptions.

Internal Improvements

  • Migrated all message components from raw()component() for proper
    Adventure API color rendering.
  • SpawnCommand cooldown tracking simplified from ConcurrentHashMap<UUID, Boolean>
    to Set<UUID>.
  • UpdateChecker now uses a static reusable HttpClient and a dedicated
    ExecutorService.
  • ConfigUtil delegates to Bukkit's built-in getInt() instead of manual parsing.