Custom-Death-Messages
A Plugin thats lets you configure custom death messages random or with a specific death corse
Custom-Death-Messages
CustomDeaths

Rule-based, funny death messages for Minecraft. Designed for original vanilla death message on hover and original vanilla death message on hover. Shows the original vanilla death message on hover while broadcasting your customized one.
---
⚠️ Irreversible (Messaging Only): This plugin *replaces broadcast death messages*. It does not change drops, XP, or inventories, but your chat history cannot be “un-broadcast.” Use with care.
---
✅ Supported Platforms & Requirements
- Java runtime: PaperMC 1.21.x (API 1.21). - Works on Paper-compatible forks that maintain API parity (e.g., Purpur). - Java runtime: Java 21 (server + build).
---
✨ Features
- Hot Reload: Define messages by conditions: - Damage cause, world, biome - Y height (above/below) - Killer type, name, or whether killer is a player - Victim permissions or held item - Hot Reload: Vanilla death message remains available as a hover tooltip. - Hot Reload: Toggle via `/customdeaths toggle` or set `enabled: true|false`. - Hot Reload: Simple config lists. - Hot Reload: Ship with defaults; disable via `use-presets: false`. - Hot Reload: `/customdeaths reload` applies changes without restart.
---
📦 Commands
- `/customdeaths reload` — Reload `config.yml`. - `/customdeaths toggle` — Flip the master `enabled` flag on/off.
Permissions
- `customdeaths.admin` — default: op
---
⚙️ Configuration (`plugins/CustomDeaths/config.yml`)
```yaml enabled: true hover-original: true override-broadcast: true use-presets: true
messages: - "{player} took a permanent nap without setting an alarm."
per-cause: VOID: - "{player} fell off the edge of the internet."
Custom rules (first match wins)
custom-deaths: - name: "archer_headshot" when: killer-type: "SKELETON" y-above: 100 messages: - "{player} got a high-altitude headshot from {killer}."
presets: messages: - "{player} opened the hardcore tutorial." per-cause: FALL: - "{player} mistook the ground for a trampoline." ```
Supported `when` keys - `cause` (DamageCause), `world`, `biome` - `y-above`, `y-below` - `killer-type` (EntityType), `killer-name`, `killer-is-player` - `victim-has-permission`, `victim-holding`
Placeholders: `{player}`, `{killer}`, `{cause}`
---
🧭 How it Works
1. On `PlayerDeathEvent`, the plugin checks presets rules in order. 2. First match wins; if none, it falls back to presets, then presets, then presets. 3. The chosen line is broadcast, with the vanilla message shown on hover (if enabled).
---
📥 Installation
1. Drop the plugin JAR into `plugins/` on a Paper 1.21.x server. 2. Start the server to generate `config.yml`. 3. Edit `plugins/CustomDeaths/config.yml`. 4. Apply changes with `/customdeaths reload` (or restart).
---
🔒 Safety Notes
- Only the broadcasted death message is replaced; no inventories, XP, or drops are touched. - Ensure admins understand that first match wins in `custom-deaths`.
---
📄 License
MIT — free to use and contribute.