
CustomDeathMessages
Die with style, not silence! Replace boring death notices with hilarious, colorful, and personalized messages. Add sounds, particles, and titles to turn every demise into a memorable event.
Список изменений
📜 CHANGELOG - CustomDeathMessages v0.0.6
The evolution continues! Version 0.0.6 refines the groundbreaking features of v0.0.5 and introduces powerful new capabilities for unparalleled customization, accuracy, and user experience. This update is all about precision, control, and polish.
⚠️ IMPORTANT UPGRADE NOTE
To ensure you get all the new configuration options and message placeholders, it is highly recommended that you:
- Make a backup of your existing
config.ymlandmessages.ymlfiles.- Delete the old
config.ymlandmessages.ymlfiles from your server'splugins/CustomDeathMessages/folder.- Restart or reload the server. The plugin will automatically generate fresh, up-to-date configuration files with all the new settings and examples.
- You can then manually re-add your custom messages and settings from your backup into the new files.
✨ New Features
-
Added: Advanced Killer Attribution System
The plugin now distinguishes between the Responsible Entity ({killer_name}) and the Direct Damage Source ({killer_source}). For example, if a skeleton shoots you,{killer_name}will be "Skeleton" and{killer_source}will be "Arrow". This allows for incredibly detailed and context-aware messages. -
Added: Sophisticated Conditional Logic
Conditional messages now support complex logic withANDandORoperators, plus new comparison operators likeequals,startsWith,endsWith,>,<,>=, and<=. You can now create messages for scenarios like:{distance} > 10 AND {victim_effects} contains 'Poison'. -
Added: New Placeholder:
{biome}
Personalize death messages based on the environment! The new{biome}placeholder (e.g., "Plains", "Nether Wastes", "Deep Dark") allows you to create messages like "consumed by the eternal flames of the Nether". -
Added: Permission-Based Help System
Administrators can now control exactly which help pages (/cdmhelp) different user groups can access. Configure this via the newhelp-permissionssection inconfig.yml(e.g.,vip: [1, 2],default: [1]). -
Added: Dynamic Help Page Generation
The/cdmhelpcommand now generates its pages dynamically from themessages.ymlfile, making it easier to maintain and translate. The system automatically calculates the total number of pages. -
Added: Atomic Configuration Reload
The/cdmreloadcommand now uses an atomic reload system. If any part of the new configuration (config or messages) fails to load, the plugin reverts to the previous, working state, preventing server crashes due to bad configs. -
Added: Enhanced Test Command
The/cdm testcommand now accepts a fourth optional argument to manually specify the{killer_source}(e.g.,/cdm test ENTITY_ATTACK Skeleton Arrow), allowing for comprehensive testing of the new killer attribution system.
🐛 Bug Fixes
-
Fixed: Projectile Attribution
TheDamageTrackerhas been upgraded to correctly trace projectiles (arrows, fireballs, etc.) back to their original shooter, ensuring{killer_name}is always accurate, even for ranged attacks. -
Fixed: Biome Name Formatting
The new{biome}placeholder now correctly formats biome names (e.g., converting "NETHER_WASTES" to "Nether Wastes") for a clean, user-friendly output. -
Fixed: Help Command Page Validation
The help command now correctly validates the total number of pages after they are generated, preventing errors when trying to access non-existent pages. -
Fixed: Epic Effect Caching
Sound and particle effects for epic deaths are now cached during theMessagesManagerinitialization, improving performance and eliminating potential null-pointer errors.
🛠️ Improvements & Optimizations
-
Improved: Code Structure and Maintainability
Key classes likeMessageFormatterandMessageSelectorhave been refactored for better readability and easier future expansion. TheDeathContextclass now holds richer data. -
Improved: Configuration Validation
Added more robust logging for invalid epic sound and particle configurations inmessages.yml, helping server admins debug their setups. -
Improved: Tab Completion
The/cdm testcommand's tab completer now provides intelligent suggestions for the new{killer_source}argument (e.g., "Arrow", "Creeper", "Lava"). -
Updated: Documentation
Bothconfig.ymlandmessages.ymlhave been meticulously updated with detailed comments and examples for all new features, including the advanced conditional syntax and the new placeholders. -
Optimized: Resource Management
The atomic reload system ensures that server resources are not wasted on partially loaded or broken configurations, leading to a more stable server environment.
