File Details
discordbridge-1.1.4.jar
- R
- Apr 23, 2026
- 15.35 MB
- 45
- 1.21.1
- NeoForge
File Name
discordbridge-1.1.4.jar
Supported Versions
- 1.21.1
Curse Maven Snippet
[1.1.4] - 2026-04-23
Added
- Asynchronous Storage Initialization — New
StorageInitializerclass loads all JSON storages (VerifiedUserStorage, BanStorage, StaffUserStorage, ActiveSessionStorage) in parallel on dedicated threads. Server startup no longer blocked by file I/O. - Centralized Crash Handler — New
CrashHandlerutility generates detailed crash reports tocrash-reports/discordbridge/. Each report includes: Java version, OS info, full stack trace, cause chain, thread states, and active threads summary. Two modes:- Fatal Crashes — Uncaught exceptions create timestamped
.txtfiles in crash directory - Non-Fatal Errors — Caught exceptions logged with context for debugging
- Fatal Crashes — Uncaught exceptions create timestamped
- Comprehensive Error Handling — All event handlers (
GameEventHandler), bot initialization (BotManager), and database operations (DatabaseManager) now wrapped in try-catch with proper crash reporting. - Enhanced Bot Error Differentiation — Distinguishes between
IllegalArgumentException(invalid token) and other connection errors for better diagnostics. - Atomic Database Table Creation — Each
CREATE TABLEstatement fails independently; one table error doesn't block others.
Fixed
- CRITICAL: Server Startup Slowdown — JSON files were loaded synchronously, blocking server startup by 5-7 seconds. Now loaded asynchronously in parallel, reducing startup time to 1-2 seconds.
- CRITICAL: Silent Crashes — No centralized logging for uncaught exceptions. Now all crashes generate detailed reports with full diagnostics.
- Event Handler Failures — Chat relay, player events, and death messages could crash silently. Now all event handlers properly protected with error handling.
- Database Initialization Fragility — If one table creation failed, others weren't attempted. Now each table is independent.
- Incomplete Bot Error Context — Discord connection errors lacked meaningful debugging info. Now includes token validation and specific error types.
Performance
- Server Startup — ~60-70% faster (5-7s → 1-2s) due to async parallel storage loading
- Non-Blocking I/O — All file operations happen on dedicated threads, zero impact on main server thread
- Parallel Storage Loading — 4 storages load simultaneously on 2-thread pool instead of sequentially
- Progress Visibility — Logs show individual storage load times for diagnostics
Technical Details
New Classes:
CrashHandler.java— Centralized exception logging and crash report generationStorageInitializer.java— Parallel async storage initialization with progress tracking
Modified Classes:
DiscordBridge.java— Initialize CrashHandler first; use StorageInitializer; wrap setup in try-catchBotManager.java— Distinguish IllegalArgumentException; enhance error logging with CrashHandlerDatabaseManager.java— Wrap table creation in try-catch per tableGameEventHandler.java— Wrap all event handlers in try-catch with CrashHandler logging
Documentation:
Documentation/17_PERFORMANCE_CRASH_OPTIMIZATION.md— Complete guide to optimizations and crash reporting
Notes
- Crash reports stored in
crash-reports/discordbridge/with timestamps for easy investigation - StorageInitializer shows progress:
[DiscordBridge] Storages ready for querieswhen complete - All storage operations (DB/JSON) continue to work normally during async loading phase

