---
### 📜 CHANGELOG - CustomDeathMessages v0.0.7
The evolution never stops! Version 0.0.7 takes the solid foundation of v0.0.6 and elevates it with an **essential tool for administrators: a built-in configuration validator**. This release focuses on **error prevention, ease of use, and stability**, ensuring your experience with custom death messages is flawless.
> **⚠️ IMPORTANT UPGRADE NOTE**
> To fully leverage the new features and ensure compatibility:
> 1. **Make a backup** of your current `config.yml` and `messages.yml` files.
> 2. **Delete** the `config.yml` and `messages.yml` files from your server's `plugins/CustomDeathMessages/` folder.
> 3. Restart or reload the server. The plugin will automatically generate new, up-to-date configuration files with all new options, examples, and system messages.
> 4. You can then manually re-add your custom settings and messages from your backup into the new files.
#### ✨ New Features
* **Added: Integrated Configuration Validator (`/cdm config validate`)**
The flagship feature of this version! This new command allows administrators to **validate the correctness of their `config.yml` and `messages.yml` files** before reloading. It scans for:
* Invalid sounds and particles (global, per-group, and epic).
* Syntax errors in conditions (unknown operators, malformed placeholders).
* Generates a detailed report in the chat with success (✅), error (❌), and warning (⚠️) messages, along with a summary of the current configuration.
* **Added: New System Messages for the Validator**
A complete section has been added to `messages.yml` under `system-messages` with translatable messages for the validator, such as `config-validator-sound-not-found`, `config-validator-condition-syntax-warning`, and `config-validator-success-all`, enabling a fully localizable user experience.
* **Added: New `/cdmconfig` Command**
A new entry point for the validator. Administrators can run `/cdm config validate` to start the validation process. Uses the `cdm.reload` permission.
#### 🐛 Bug Fixes
* **Fixed: Enhanced Atomic Reload**
The `/cdmreload` command has been improved to be even more robust. It now **explicitly validates `messages.yml` before attempting to load `config.yml`**. If `messages.yml` has a critical syntax error (e.g., malformed YAML), the reload process stops immediately, notifies the user, and prints the full stack trace to the console, preventing any unstable intermediate state.
* **Fixed: Error Handling in Reload**
Improved error handling in `/cdmreload` to capture and report unexpected failures more clearly, ensuring the administrator always receives feedback, even in edge cases.
#### 🛠️ Improvements & Optimizations
* **Improved: Administrator Experience**
The validator provides a proactive way to debug configurations, drastically reducing the risk of runtime errors and saving hours of frustration from misplaced brackets or commas.
* **Improved: Documentation**
The `config.yml` and `messages.yml` files have been updated with comments referencing the new validation functionality, guiding users on how to keep their configurations error-free.
* **Optimized: Development Workflow**
The introduction of `ConfigValidator` sets a pattern for future diagnostic and maintenance tools within the plugin, improving the codebase's long-term structure.
With v0.0.7, CustomDeathMessages is not only more powerful but also **safer and easier to manage**. The integrated validator is a giant leap towards a perfect user experience for both players and administrators.
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }