LiteBans DB pool risk: the plugin was closing the JDBC Connection pulled from PreparedStatement.getConnection(). With pooled connections that can cause weird pool behavior; it’s safer to only close ResultSet + PreparedStatement (LiteBans manages the connection lifecycle).
Shutdown / reload race: async history loads and LiteBans event callbacks could still try to schedule work after the plugin disables, causing sporadic errors.
Punishment chime dedupe: entryAdded could fire after the UI-triggered “pre-chime”, and there was a window where it could double-play.
Fixes Applied
Removed manual Connection closing; now only closes statement/result, reducing risk of LiteBans pool instability.
Added isEnabled() guards so async tasks and event callbacks bail out cleanly during disable/reload.
Added dedupe timestamp write inside the LiteBans entryAdded handler to prevent double chimes reliably.
Wrapped playSound in a safe try/catch to avoid edge-case crashes from invalid sound keys.