# CustomDeathMessages - Changelog
---
## Version 1.4
Now targeting Minecraft 26.3.
---
### Critical Bug Fixes
**Message Lookup System**
- Fixed group message cache building incorrect configuration paths. The cache searched for keys without the required parent prefix, causing all group messages to return null at runtime and fall back to the hardcoded default. Messages configured under permission groups now resolve correctly.
- Fixed cause-specific message keys using an incorrect section name. The lookup expected a different key structure than what the configuration file provides, causing cause-based messages such as FALL, FIRE, and ENTITY_ATTACK to never be found.
- Fixed default group message key mismatch. The cache builder searched for a key name that does not exist in the configuration schema.
- Fixed conditional message lookup using an incorrect path prefix. Conditional messages were searched at the wrong configuration depth, preventing all condition-based messages from being evaluated at runtime.
- Fixed conditional message default entries in the shorthand YAML format not being recognized. Entries using the single-key default notation were ignored because the parser only checked for the explicit condition and message pair format.
- Fixed group sound cache building paths without the required parent prefix, causing per-group death sounds to never load at runtime despite passing validation.
**Killer Resolution**
- Fixed environmental deaths incorrectly resolving the victim as their own killer. The fallback damage cause lookup used a method that returns the damaged entity rather than the damaging entity, causing deaths by lava, fire, fall, and void to display the victim's own name in the killer placeholder.
- Added defensive handling in the killer name placeholder to return a safe default when the killer is unresolved, preventing edge cases where the placeholder could resolve to an unintended value.
**Test Command**
- Fixed the test command rejecting all valid input due to a redundant subcommand check. The command router already consumed the subcommand keyword before passing arguments to the handler, but the handler still expected it, causing every invocation to return a usage error.
- Fixed argument parsing offset being misaligned by one position after the routing layer strips the subcommand keyword. This caused causes, killers, and sources to be read from the wrong argument positions.
- Fixed broadcast and effect flags being parsed as cause or killer arguments instead of being extracted before argument interpretation. Flags such as global, global-sound, and global-particles can now appear in any position without corrupting the parsed values.
- Fixed inconsistent usage documentation between two separate message entries. Both now display the same syntax.
**Epic Death System**
- Fixed epic death determination performing two independent random rolls, one for effects and one for message selection. This caused desynchronization where epic effects could play with a normal message, or an epic message could appear without any effects. The roll is now performed once and shared across all systems.
- Fixed epic messages overriding per-world messages. Per-world messages now always take priority regardless of epic status.
- Fixed the epic death subtitle displaying a hardcoded generic cause instead of the actual cause of death.
**Thread Safety**
- Fixed death message recipient calculation executing on an asynchronous thread, accessing world and entity data outside the main server thread. This could cause concurrent modification exceptions and inconsistent player lists under load. Recipient calculation now executes synchronously on the main thread.
**Particle Effects**
- Fixed the darken screen effect spawning zero particles due to a count parameter set to zero. The effect was active in configuration but produced no visible output.
**Configuration File Structure**
- Fixed newly added system message entries being placed under the wrong configuration section. All system messages are now correctly located under the system-messages block and are properly loaded at runtime.
---
### Bug Fixes
**Help System**
- Fixed compound command help lookup failing for multi-word commands. The help system only read the first argument, preventing lookup of entries with spaces in their key names such as config validate.
- Fixed help command displaying a hardcoded player-only error instead of using the configurable message.
- Fixed help detail labels for description, usage, and permission being hardcoded instead of configurable.
- Fixed help command list line format being hardcoded instead of configurable.
**Command System**
- Fixed unified command router displaying a hardcoded unknown command error instead of using the configurable message.
- Fixed general help output displaying hardcoded strings instead of using configurable messages.
- Fixed configuration command displaying hardcoded permission and usage errors instead of using configurable messages.
- Fixed reload manager displaying hardcoded status messages instead of using configurable messages.
- Fixed test error output displaying a hardcoded error prefix instead of using the configurable message.
- Fixed test context builder throwing exceptions with hardcoded messages instead of using configurable messages.
**Test Summary**
- Fixed the test summary sound and particle information performing independent random rolls, causing the displayed information to not match the actual test result. The epic status is now determined once and shared across the entire summary.
**Event Registration**
- Fixed startup log reporting an incorrect number of registered event listeners.
**Update Checker**
- Fixed version comparison crashing with a NumberFormatException when the remote version string contains non-numeric characters such as suffixes or prefixes. Version strings are now sanitized before comparison.
**Tab Completion**
- Added tab completion support for the test command, including death causes, online player names, and effect flags.
- Fixed help tab completion only suggesting an incomplete set of options.
**Configuration Validator**
- Fixed validation passing without checking the internal structure of message groups. The validator now verifies that each group contains the required message sections and reports warnings when they are missing, preventing silent runtime failures.
- Added validation for conditional message structure within each group.
**Performance**
- Fixed the particle manager being instantiated twice per death event. A single instance is now created and reused.
**Build Configuration**
- Removed a duplicate build configuration file that conflicted with the primary build definition.
- Removed an unused internal message selection class that contained duplicate path resolution bugs.
---
### Changes
- All user-facing messages have been migrated from hardcoded strings to the external message configuration file. Server owners can now fully customize every message the plugin sends, including command errors, help text, test summaries, broadcast confirmations, and reload status messages.
- Per-world messages now take absolute priority over all other message selection logic, including epic deaths.
- The epic death flag is determined once per death event and shared consistently across message selection, sound playback, particle effects, titles, action bar, and lightning.
- The test command now extracts effect flags before parsing positional arguments, allowing flags to appear in any position without corrupting the cause, killer, or source values.
- The test summary now displays whether the simulated death rolled as epic.
- The configuration validator now performs deep structural validation of message groups and conditional message sections.
---
### Improvements
- Improved killer resolution logic to properly distinguish between entity-caused and environment-caused deaths.
- Improved message cache construction to align with the actual configuration file schema.
- Improved conditional message evaluation to support both explicit condition and message pairs and shorthand default entries.
- Improved nickname resolution through Essentials integration, applied consistently across victim, killer, and respawn message placeholders.
- Improved broadcast sound playback to use the recipient's location for global and victim-only modes, eliminating world-boundary and distance limitations.
- Improved particle manager to store a direct plugin reference instead of performing runtime plugin lookups by name.
- Improved reload sequence to fully unregister and re-register all event listeners, preventing stale listener references after configuration reloads.
---
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" }