CrownPunishments 2.0
A complete rewrite of the plugin architecture, database optimization, and preparation for Crown Premium Version.
⚠️ CRITICAL WARNING: READ BEFORE UPDATING ⚠️
This update introduces a massive database schema change (v1 -> v2). While the plugin contains an automatic migration system, it is highly recommended to perform a full backup before installing this version.
- If you are using SQLite (crownpunishments.db), copy the file to a safe location.
- If you are using MySQL, export your database.
UPGRADING TO CROWN PREMIUM?
If you plan to purchase or upgrade to the full
Crown premium version to unlock Moderator Mode, Reports, Profiles, and Lockers, you
MUST follow this specific order to ensure your data is preserved:
1.
Update your server to
CrownPunishments 2.0 (this version).
2.
Start your server and watch the console.
3. Wait for the message:
"[Crown] Database migration completed successfully!".
4.
Stop the server.
5.
Delete
CrownPunishments.jar and install
Crown.jar.
6.
Start the server.
Do not jump directly from CrownPunishments 1.x to Crown Premium, or your punishment history may not migrate correctly.
✨ CHANGELOG v2.0
️ Core & Architecture
- Complete Codebase Rewrite: The plugin has been refactored to align with the premium architecture.
- Database Overhaul:
- Implemented HikariCP for high-performance, asynchronous database connection pooling.
- Added automatic schema migration from v1 to v2.
- New tables added for active_warnings, player_info (stores inventory/location at time of punishment), reports, and moderator_preferences.
- Config Structure: Configuration is no longer monolithic.
- Punishments now have their own files: punishments/ban.yml, mute.yml, warn.yml, etc.
- Menus are split into individual files under menus/.
⚖️ Punishment System Improvements
- Advanced Warning System:
- Added Warning Levels: Define what happens when a player reaches X warnings (e.g., 2 warns = 1 day mute).
- Added Expiration Modes: Choose between unique (new warn replaces old) or incremental (timers pause and resume).
- New Command: Added /check <ID> to view detailed information about a specific punishment, including player health, inventory, and location at the time of the incident.
- Better Freeze System: The freeze system now includes a persistent chat session between the moderator and the target.
- MiniMessage Support: Added support for modern text formatting (Gradients, RGB) using the MiniMessage format (e.g., <gradient:red:gold>Text</gradient>). Legacy & codes are still supported.
️ GUI & User Interface
- History Menu V2: Completely redesigned history GUI with pagination and detailed filtering.
- Punish Details Menu: Now supports toggling between IP and Local punishment directly from the GUI (if enabled in config).
- Dynamic Items: Menu items are now fully configurable with support for custom model data and complex click actions.
Premium Architecture Support
- This version includes the foundation for Moderator Mode, Reports*, Player Profiles, and Lockers.
- Note: While the code for these features exists in v2.0, accessing them (/mod, /report, /profile) requires the Premium version. This update prepares your data for a seamless upgrade.
Bug Fixes
- Fixed issues with time parsing for permanent punishments.
- Fixed an issue where "Softban" blocked commands weren't clearing properly on expiry.
- Optimized main thread performance by moving all database I/O to async threads.
- and many more...