Enhanced Compatibility:
- Verified full compatibility with Minecraft versions 1.21.4 and beyond.
New Features:
1. Configuration Management Enhancements:
- Dynamic Key Merging:
- Automatically merges new configuration keys from the defaultconfig.ymlinto the existing file while preserving user-defined values.
- Ensures missing keys such as XP-specific settings are added without overwriting existing customizations.
- Versioning for Updates:
- Introducedconfig-versionfor streamlined updates and tracking. The plugin now identifies outdated configurations and updates them while preserving custom settings.
2. New XP Settings:
- Added multiple configuration options for fine-grained XP control:
-repair-cost-xp: When set tofalse, repairing items does not consume XP levels. Repair costs still apply but XP is ignored.
-grindstone-refund-xp: When set tofalse, players do not gain XP when disenchanting items using a grindstone.
-xp-in-creative: Determines whether players in Creative mode can earn XP. Defaults tofalse.
-xp-global-disable: A master toggle to disable all XP rewards in the game. This setting overrides all other XP configurations.
-xp-scaling-factor: Allows global scaling of XP rewards. Set to1.0for normal XP,0.5for half XP, and so on.
3. bStats Integration:
- Introduced bStats analytics for usage tracking and plugin improvement.
- Explicit logging added to indicate whether bStats is enabled or disabled, along with a prompt encouraging users to enable it to support development.
Bug Fixes:
- Configuration Loading:
- Fixed an issue where missing configuration keys were not added during updates, leading to plugin disablement.
- Ensured that configuration updates no longer override user-defined values.
- XP Handling Fixes:
- Corrected XP costs for anvils to align with therepair-cost-xpconfiguration setting.
- Fixed an issue where grindstone XP refunds were not properly configurable, allowing for full control via the newgrindstone-refund-xpoption.
- bStats Initialization:
- Resolved edge cases where metrics integration failed silently when bStats was disabled.
- Added explicit logs to confirm bStats status and initialization.
Refactor Highlights:
- Full Codebase Refactor:
- Streamlined and modularized code for better maintainability.
- Extracted configuration-related logic into a dedicatedBoostedConfigManagerclass to centralize responsibilities for loading, validating, and merging configurations.
- Simplified theMain.javaclass to reduce complexity and improve readability.
- Improved Logging:
- Enhanced logging feedback for key operations such as configuration loading, task initialization, and plugin lifecycle events.
- Context-aware success, warning, and error messages added for better debugging and clarity.
Recommended Steps:
1. Configuration Update:
- Existing configurations will be automatically updated with new keys while preserving user settings.
- To regenerate a fresh configuration file for review or customization, delete the currentconfig.ymland restart the server.
2. Testing:
- Test all new XP-related functionalities:
- Repair mechanics to ensure XP costs are applied or ignored as configured.
- Grindstone disenchanting to verify XP refunds match the settings.
- Global XP scaling using thexp-scaling-factor.
- Confirm bStats integration and test plugin analytics logging.
Changelog v1.0.1
- Fractional XP System: We now track partial XP to ensure no XP goes to waste. This means whenever you gain fractional XP, it accumulates until it becomes a whole number, and is then awarded to you.
- Creative XP Toggle: There's a new option in the config to allow or disallow XP gains while in Creative mode.
- Debug Mode: A new
debugsetting has been introduced to help with diagnostics. When enabled, more information is shown to users (with permission) and is logged in the console.- More Customisation:
- Blocks: Configuration now supports per-block XP overrides.
- Furnace Extraction: Smelting items in a furnace can now grant XP based on how many items are smelted.
- Enhanced Warnings: Warnings now only show if debug mode is enabled.
- Minor Tweaks & Fixes: Various behind-the-scenes improvements to performance and stability.
Breaking Change in Configuration
- Config Structure Updates: We have introduced new config paths and settings (for example,
xp-overrides.blocks.*,xp-overrides.crafting.FURNACE.*, fractional XP settings, andxp-in-creative).- Recommendation: It is strongly recommended to delete your existing
config.ymland let the plugin generate a fresh version. If you continue to use an older config, you may encounter errors or miss out on the new features.
Other Notable Improvements
- Periodic Clean-ups: The plugin now cleans up old damage data more effectively, preventing lag or memory usage from stale entries.
- Zero/Negative XP Bypasses: If a source tries to grant zero or negative XP, the plugin will now skip it more gracefully.
- More XP Sources: Additional checks for XP awarding in various events (like grindstone usage and block interactions).
