SpyDeathMessages
一款专为运行 Spigot / Paper 1.21+ 的 Minecraft 服务器打造的先进、完全可自定义的死亡消息插件。
用您自定义样式的聊天行、动作栏消息、标题和副标题替换原版死亡消息,并全面支持 十六进制颜色代码 和 Minecraft 传统颜色代码。
功能特性
- 两种死亡消息类型:被玩家击杀 和 死亡(其他任何原因)
- 每条消息拥有四个独立的发送渠道:聊天、动作栏、标题、副标题
- 在配置文件中可以单独开启或关闭每个渠道
- 每种类型支持多条消息——每次随机选择其中一条显示
- 全面支持 十六进制颜色代码 (
#ff1313) 以及传统的 & 颜色代码 (&c)
- 按玩家开关 ——每位玩家可自行决定是否查看死亡消息
- 玩家偏好设置会 跨服务器重启保存
- 三种广播模式:全局、仅当前世界 或 指定半径
- 可自定义标题动画的时间参数
- 提供取消原版死亡消息的选项
- 所有命令均支持 Tab 补全
安装指南
- 下载
SpyDeathMessages.jar
- 将其放入服务器的
plugins/ 文件夹中
- 启动或重启服务器
- 插件将自动生成
plugins/SpyDeathMessages/config.yml
- 根据需要编辑配置文件,然后运行
/dm reload
命令列表
| 命令 |
使用者权限 |
功能说明 |
/dm toggle |
所有玩家 |
开启或关闭 仅对自己可见 的死亡消息 |
/dm reload |
管理员 (op) |
在不重启服务器的情况下重新加载 config.yml |
/dm help |
所有玩家 |
在聊天栏中显示帮助列表 |
别名:/deathmessages 的功能与 /dm 完全相同
权限节点
| 权限节点 |
默认值 |
描述 |
spydm.admin |
OP |
授予所有管理员命令的访问权限(包含 spydm.reload) |
spydm.reload |
OP |
允许使用 /dm reload 重新加载配置文件 |
/dm toggle 无需任何权限 —— 默认情况下对所有玩家开放。
按玩家开关
任何玩家都可以运行 /dm toggle 来从自己的屏幕上隐藏死亡消息。
- 默认状态: 消息可见(已启用)
- 运行
/dm toggle 后:消息被隐藏(已禁用)
- 再次运行
/dm toggle:消息重新变为可见(恢复启用)
- 该选择会被 保存到磁盘(插件文件夹内的
opted_out.txt),因此能经受住服务器重启
死亡的玩家始终会在消息中向其他人显示——此开关仅控制 您 是否在屏幕上看到消息。
配置 (config.yml)
设置项
settings:
# 插件反馈消息中显示的前缀
prefix: "#a8a8a8[#00a4fcDeathMsg#a8a8a8] "
# 是否隐藏原版 Minecraft 死亡消息?
cancel_vanilla_message: true
# 谁接收死亡消息:
# global - 所有在线玩家
# world - 仅限同一世界的玩家
# radius - 仅限广播半径内的玩家
broadcast_mode: global
broadcast_radius: 100
# 标题动画(单位为刻,20 刻 = 1 秒)
title_fade_in: 10
title_stay: 60
title_fade_out: 10
消息类型
配置中包含 两种消息类型:
| 键名 |
触发时机 |
killed |
一名玩家被另一名玩家击杀(近战或远程攻击) |
died |
一名玩家因其他任何原因死亡(坠落、火焰、岩浆、虚空、怪物等) |
消息结构
每条消息类型遵循以下结构:
messages:
killed: # 或者:died
module:
chat:
enabled: true # 是否在聊天栏显示?true/false
message:
- "Line one" # 如果有多行,则随机选择一行显示
- "Line two"
actionbar:
enabled: true # 是否在动作栏显示?true/false
message:
- "Action bar text"
title:
enabled: false # 是否作为大标题显示?true/false
message:
- "Title text"
subtitle:
enabled: false # 是否作为标题下方的副标题显示?true/false
message:
- "Subtitle text"
将任何渠道的 enabled 设置为 false 以完全禁用它。
将 enabled 设置为 true 以激活它。
占位符
在任何消息字符串中使用以下占位符:
| 占位符 |
替换为 |
%victim% |
死亡玩家的名称 |
%attacker% |
击杀者的名称 |
%weapon% |
杀手当时手持物品的名称 |
%world% |
发生死亡的地图名称 |
%attacker% 和 %weapon% 仅在 killed 消息中填充。对于 died 消息,它们将为空。
颜色代码
您可以在消息中的任何位置使用 两种格式:
十六进制颜色:
#ff1313 → 红色
#00a4fc → 蓝色
#a8a8a8 → 灰色
#ffcc00 → 金色
传统 & 代码:
&a → 绿色 &c → 红色
&b → 青色 &e → 黄色
&d → 淡紫色 &f → 白色
&0–&9 → 各种颜色 &l → 加粗
&o → 斜体 &n → 下划线
&m → 删除线 &k → 乱码
&r → 重置
混合使用示例:
"#a8a8a8» #ff1313☠ #ff1313%victim% #a8a8a8was killed by #00a4fc%attacker%"
随机消息
如果在 message 列表中提供了多行文本,插件将在每次玩家死亡时随机选择其中一条:
chat:
enabled: true
message:
- "#a8a8a8» #ff1313☠ #ff1313%victim% #a8a8a8was slain by #00a4fc%attacker%"
- "#a8a8a8» #ff1313☠ #ff1313%victim% #a8a8a8was killed by #00a4fc%attacker%"
- "#a8a8a8» #ff1313☠ #ff1313%victim% #a8a8a8didn't survive %attacker%"
默认配置
settings:
prefix: "#a8a8a8[#00a4fcDeathMsg#a8a8a8] "
cancel_vanilla_message: true
broadcast_mode: global
broadcast_radius: 100
title_fade_in: 10
title_stay: 60
title_fade_out: 10
messages:
死亡:
模块:
聊天:
启用:true
消息:
- "#a8a8a8» #ff1313☠ #ff1313%victim% #a8a8a8被 #ff1313? #00a4fc%attacker% #a8a8a8击杀"
- "#a8a8a8» #ff1313☠ #ff1313%victim% #a8a8a8被 #00a4fc%attacker% 杀死"
操作栏:
启用:true
消息:
- "#ff1313☠ %victim% 被 %attacker% 杀死"
标题:
启用:false
消息:
- "#ff1313☠ 你死了"
副标题:
启用:false
消息:
- "#a8a8a8被 #00a4fc%attacker% 击杀"
死亡:
模块:
聊天:
启用:true
消息:
- "#a8a8a8» #ff1313☠ #ff1313%victim% #a8a8a8已死亡"
操作栏:
启用:false
消息:
- "#ff1313☠ %victim% 已死亡"
标题:
启用:false
消息:
- "#ff1313☠ 你死了"
副标题:
启用:false
消息:
- ""
---
## 插件创建的文件
| 文件 | 位置 | 用途 |
|---|---|---|
| `config.yml` | `plugins/SpyDeathMessages/` | 所有消息和设置配置 |
| `opted_out.txt` | `plugins/SpyDeathMessages/` | 保存关闭死亡消息的玩家 UUID |
---
## 从源码构建
需要 **Java 8+** 和 **Maven**。
```bash
mvn package
输出:target/SpyDeathMessages.jar
兼容性
| 项目 |
版本 |
| Minecraft |
1.21+ |
| 服务端软件 |
Spigot, Paper |
| Java |
8 或更高 |
作者
由 YourSenior 制作
SpyDeathMessages
An advanced, fully customisable death messages plugin for Minecraft servers running Spigot / Paper 1.21+.
Replaces the vanilla death message with your own styled chat lines, action bar messages, titles, and subtitles — with full hex colour and Minecraft colour code support.
Features
- Two death message types: killed by player and died (any other cause)
- Four independent delivery channels per message: chat, action bar, title, subtitle
- Every channel can be turned on or off individually in the config
- Multiple messages per type — one is chosen at random each time
- Full hex colour support (
#ff1313) alongside legacy & colour codes (&c)
- Per-player toggle — each player decides whether they want to see death messages
- Player preference persists across server restarts
- Three broadcast modes: global, world-only, or radius
- Configurable title animation timings
- Option to cancel the vanilla death message
- Tab-complete on all commands
Installation
- Download
SpyDeathMessages.jar
- Place it in your server's
plugins/ folder
- Start or restart the server
- The plugin will generate
plugins/SpyDeathMessages/config.yml automatically
- Edit the config to your liking, then run
/dm reload
Commands
| Command |
Who can use it |
What it does |
/dm toggle |
Every player |
Turns death messages on or off for yourself only |
/dm reload |
Admins (op) |
Reloads config.yml without restarting the server |
/dm help |
Everyone |
Shows the help list in chat |
Alias: /deathmessages works the same as /dm
Permissions
| Permission |
Default |
Description |
spydm.admin |
OP |
Grants access to all admin commands (includes spydm.reload) |
spydm.reload |
OP |
Allows reloading the config with /dm reload |
/dm toggle requires no permission — it is available to every player by default.
Per-Player Toggle
Any player can run /dm toggle to hide death messages from their own screen.
- Default state: messages are visible (opted in)
- After running
/dm toggle: messages are hidden (opted out)
- Running
/dm toggle again: messages become visible again (opted back in)
- The choice is saved to disk (
opted_out.txt inside the plugin folder) so it survives server restarts
The player who died always appears in the message for others — the toggle only controls whether you see messages on your screen.
Configuration (config.yml)
Settings
settings:
# Prefix shown in plugin feedback messages
prefix: "#a8a8a8[#00a4fcDeathMsg#a8a8a8] "
# Hide the vanilla Minecraft death message?
cancel_vanilla_message: true
# Who receives death messages:
# global - all online players
# world - only players in the same world
# radius - only players within broadcast_radius blocks
broadcast_mode: global
broadcast_radius: 100
# Title animation (in ticks, 20 ticks = 1 second)
title_fade_in: 10
title_stay: 60
title_fade_out: 10
Message Types
There are two message types in the config:
| Key |
When it triggers |
killed |
A player is killed by another player (melee or projectile) |
died |
A player dies from any other cause (fall, fire, lava, void, mob, etc.) |
Message Structure
Each message type follows this structure:
messages:
killed: # or: died
module:
chat:
enabled: true # show in chat? true/false
message:
- "Line one" # if multiple lines, one is picked at random
- "Line two"
actionbar:
enabled: true # show in action bar? true/false
message:
- "Action bar text"
title:
enabled: false # show as big title? true/false
message:
- "Title text"
subtitle:
enabled: false # show as subtitle below title? true/false
message:
- "Subtitle text"
Set enabled: false on any channel to completely disable it.
Set enabled: true to activate it.
Placeholders
Use these inside any message string:
| Placeholder |
Replaced with |
%victim% |
Name of the player who died |
%attacker% |
Name of the player who killed them |
%weapon% |
Name of the item the killer was holding |
%world% |
Name of the world the death happened in |
%attacker% and %weapon% are only filled for killed messages. They will be empty for died messages.
Colour Codes
You can use both formats anywhere in messages:
Hex colours:
#ff1313 → red
#00a4fc → blue
#a8a8a8 → grey
#ffcc00 → gold
Legacy & codes:
&a → green &c → red
&b → aqua &e → yellow
&d → light purple &f → white
&0–&9 → colours &l → bold
&o → italic &n → underline
&m → strikethrough &k → obfuscated
&r → reset
Example combining both:
"#a8a8a8» #ff1313☠ #ff1313%victim% #a8a8a8was killed by #00a4fc%attacker%"
Random Messages
If you provide more than one line in the message list, the plugin picks one at random each time a player dies:
chat:
enabled: true
message:
- "#a8a8a8» #ff1313☠ #ff1313%victim% #a8a8a8was slain by #00a4fc%attacker%"
- "#a8a8a8» #ff1313☠ #ff1313%victim% #a8a8a8was killed by #00a4fc%attacker%"
- "#a8a8a8» #ff1313☠ #ff1313%victim% #a8a8a8didn't survive %attacker%"
Default Config
settings:
prefix: "#a8a8a8[#00a4fcDeathMsg#a8a8a8] "
cancel_vanilla_message: true
broadcast_mode: global
broadcast_radius: 100
title_fade_in: 10
title_stay: 60
title_fade_out: 10
messages:
killed:
module:
chat:
enabled: true
message:
- "#a8a8a8» #ff1313☠ #ff1313%victim% #a8a8a8was slain by #ff1313? #00a4fc%attacker% #a8a8a8using #ffcc00%weapon%"
- "#a8a8a8» #ff1313☠ #ff1313%victim% #a8a8a8was killed by #00a4fc%attacker%"
actionbar:
enabled: true
message:
- "#ff1313☠ %victim% was killed by %attacker%"
title:
enabled: false
message:
- "#ff1313☠ YOU DIED"
subtitle:
enabled: false
message:
- "#a8a8a8Killed by #00a4fc%attacker%"
died:
module:
chat:
enabled: true
message:
- "#a8a8a8» #ff1313☠ #ff1313%victim% #a8a8a8has died"
actionbar:
enabled: false
message:
- "#ff1313☠ %victim% has died"
title:
enabled: false
message:
- "#ff1313☠ YOU DIED"
subtitle:
enabled: false
message:
- ""
Files Created by the Plugin
| File |
Location |
Purpose |
config.yml |
plugins/SpyDeathMessages/ |
All message and settings configuration |
opted_out.txt |
plugins/SpyDeathMessages/ |
Saves UUIDs of players who turned off death messages |
Building from Source
Requires Java 8+ and Maven.
mvn package
Output: target/SpyDeathMessages.jar
Compatibility
| Item |
Version |
| Minecraft |
1.21+ |
| Server software |
Spigot, Paper |
| Java |
8 or higher |
Author
Made by YourSenior
评论 0
登录后参与评分
还没有评论,来抢沙发吧