NoDeath
NoDeath 是一款优先服务于服务器的 Fabric 模组,用于控制特定生物和玩家的死亡规则。
其目标非常明确:
- 任何使用命名牌命名为
NoDeath 的生物都不会死亡,直到它被重新命名
- 受保护的玩家不会因正常原因死亡
- 受保护的玩家只能通过命令杀死或掉入虚空来死亡
内容目录
概述
- 名为
NoDeath 的生物不会死亡
- 重命名该生物会立即移除保护
- 支持通过命令保护单个玩家
- 支持通过命令保护所有玩家
- 受保护的玩家不会因战斗、环境伤害或其他正常原因死亡
- 受保护的玩家仍可通过原版
/kill 命令或掉入虚空死亡
- 保护设置会持久化到配置文件中
- 核心逻辑在服务器端运行,因此多人游戏客户端通常无需安装此模组
行为规则
生物规则
- 仅当生物的自定义名称恰好为
NoDeath 时启用保护
- 该规则适用于原版生物以及其他模组添加的生物,只要它们可以被命名即可
- 保护机制在不依赖客户端逻辑的情况下阻止最终的死亡步骤
- 将生物重命名为任何其他值会立即移除保护
玩家规则
- 受保护的玩家不会因正常原因死亡
- 仅在以下两种情况下允许死亡:
- 当启用全局保护时,相同规则适用于所有玩家
兼容性
| 项目 |
要求 |
| Minecraft |
1.21 至 1.21.11 |
| Fabric Loader |
0.16.0+ |
| Java |
21+ |
| Fabric API |
必需 |
| Fabric Language Kotlin |
必需 |
该项目目前针对 Minecraft 1.21.11。
依赖项
将此模组与以下依赖项一起安装到目标 mods 目录中:
| 依赖项 |
是否必需 |
备注 |
| Fabric API |
是 |
提供 Fabric 事件、命令和运行时 API |
| Fabric Language Kotlin |
是 |
由于此模组使用 Kotlin 编写,因此必需 |
安装
优先服务器端使用
此模组主要设计为服务器端模组:
- 专用服务器:通常只需服务器安装此模组及其依赖项
- 单人游戏:仍需本地安装,因为单人游戏使用集成服务器
命令
所有命令默认需要管理员权限。
| 命令 |
说明 |
/nodeath |
显示当前保护概览 |
/nodeath list |
显示当前保护概览 |
/nodeath reload |
重载配置文件 |
| `/nodeath all <true |
false>` |
| `/nodeath player <player> <true |
false>` |
/nodeath status <player> |
显示某玩家当前是否处于保护状态 |
注意:
- 如需有意击杀受保护的玩家,请使用原版
/kill 命令
- 基于命令的配置仅适用于玩家,不适用于
NoDeath 命名牌规则
配置
配置文件路径:
config/no-death.json
默认配置:
{
"protectAllPlayers": false,
"protectedPlayers": []
}
| 字段 |
默认值 |
说明 |
protectAllPlayers |
false |
启用对所有玩家的保护 |
protectedPlayers |
[] |
单独受保护玩家的 UUID 列表 |
数据存储
配置和保护数据存储在以下位置:
config/no-death.json
数据特性:
- 玩家保护状态会被持久化保存
- 个体保护使用 UUID,因此即使玩家更改名字也不会失效
- 全局保护以独立的布尔标志存储
中文
NoDeath 是一个 Fabric 服务端优先模组,用于控制特定生物和玩家的死亡规则。
核心目标很简单:
- 任何被命名牌命名为
NoDeath 的生物都不会死亡,直到被改名
- 被管理员保护的玩家不会因普通方式死亡
- 被保护玩家只能通过命令击杀或掉入虚空死亡
目录
功能概览
- 命名为
NoDeath 的生物不会死亡
- 生物一旦被改成其他名字,保护立即失效
- 支持通过命令保护单个玩家
- 支持通过命令保护所有玩家
- 被保护玩家不会因普通战斗、环境伤害或其他常规方式死亡
- 被保护玩家仍然允许通过原版
/kill 或掉入虚空死亡
- 保护配置持久化保存到配置文件
- 主逻辑在服务端运行,多人服务器通常只需服务端安装
行为规则
生物规则
- 仅当生物的自定义名称严格等于
NoDeath 时启用保护
- 该规则对原版生物和模组新增生物都生效,只要它们可以被命名
- 保护会阻止最终死亡,而不要求客户端安装模组
- 如果把名字改成其他内容,保护立即移除
玩家规则
- 被保护玩家不会因普通方式死亡
- 以下两种情况仍然允许死亡:
- 开启“全体玩家保护”后,以上规则会应用到所有玩家
兼容性
| 项目 |
要求 |
| Minecraft |
1.21 到 1.21.11 |
| Fabric Loader |
0.16.0+ |
| Java |
21+ |
| Fabric API |
必需 |
| Fabric Language Kotlin |
必需 |
当前工程以 Minecraft 1.21.11 为主目标版本。
依赖
请确保以下依赖与本模组一起安装到对应环境的 mods 目录:
| 依赖 |
是否必需 |
说明 |
| Fabric API |
必需 |
提供 Fabric 事件、命令和运行时 API |
| Fabric Language Kotlin |
必需 |
本模组使用 Kotlin 编写,缺失时无法加载 |
安装方式
服务端优先
本模组优先按服务端模组使用:
- 专用服务器:通常只需服务端安装本模组和依赖,客户端不需要安装
- 单人游戏:仍需本地安装,因为单人模式本质上运行的是内置服务器
命令说明
所有命令默认要求管理员权限。
| 命令 |
说明 |
/nodeath |
查看当前保护概览 |
/nodeath list |
查看当前保护概览 |
/nodeath reload |
重新加载配置文件 |
| `/nodeath all <true |
false>` |
| `/nodeath player <玩家> <true |
false>` |
/nodeath status <玩家> |
查看指定玩家当前是否受保护 |
说明:
- 如需有意杀死受保护玩家,建议直接使用原版
/kill
- 命令配置只控制玩家保护,不控制命名生物规则
配置说明
配置文件路径:
config/no-death.json
默认配置:
{
"protectAllPlayers": false,
"protectedPlayers": []
}
| 字段 |
默认值 |
说明 |
protectAllPlayers |
false |
是否让所有玩家进入保护状态 |
protectedPlayers |
[] |
单独受保护玩家的 UUID 列表 |
数据存储
配置和保护数据保存在:
config/no-death.json
数据特点:
- 玩家保护状态会持久化保存
- 单独保护使用 UUID 保存,避免玩家改名后失效
- 全体保护使用单独布尔开关控制
NoDeath
NoDeath is a Fabric server-first mod that controls the death rules of specific mobs and players.
The goal is intentionally narrow:
- Any mob renamed to
NoDeath with a name tag cannot die until it is renamed again
- Protected players cannot die from normal causes
- Protected players can only die through command kill or by falling into the void
Contents
Overview
- Mobs named
NoDeath do not die
- Renaming the mob immediately removes the protection
- Supports protecting a single player through commands
- Supports protecting all players through commands
- Protected players cannot die from combat, environmental damage, or other normal causes
- Protected players can still die through vanilla
/kill or by falling into the void
- Protection settings are persisted to a config file
- Core logic runs on the server, so multiplayer clients usually do not need the mod installed
Behavior Rules
Mob Rules
- Protection is enabled only when the mob custom name is exactly
NoDeath
- The rule applies to vanilla mobs and mobs added by other mods, as long as they can be named
- The protection blocks the final death step without relying on client-side logic
- Renaming the mob to any other value removes the protection immediately
Player Rules
- Protected players do not die from normal causes
- Death is still allowed in exactly two cases:
- vanilla command kill such as
/kill
- falling into the void
- When global protection is enabled, the same rule applies to all players
Compatibility
| Item |
Requirement |
| Minecraft |
1.21 to 1.21.11 |
| Fabric Loader |
0.16.0+ |
| Java |
21+ |
| Fabric API |
Required |
| Fabric Language Kotlin |
Required |
The project currently targets Minecraft 1.21.11.
Dependencies
Install the following dependencies into the target mods directory together with this mod:
| Dependency |
Required |
Notes |
| Fabric API |
Yes |
Provides Fabric events, commands, and runtime APIs |
| Fabric Language Kotlin |
Yes |
Required because this mod is written in Kotlin |
Installation
Server-first Usage
This mod is designed primarily as a server-side mod:
- Dedicated server: normally only the server needs this mod and its dependencies
- Singleplayer: local installation is still required because singleplayer uses an integrated server
Commands
All commands require administrator permission by default.
| Command |
Description |
/nodeath |
Show the current protection overview |
/nodeath list |
Show the current protection overview |
/nodeath reload |
Reload the config file |
| `/nodeath all <true |
false>` |
| `/nodeath player <player> <true |
false>` |
/nodeath status <player> |
Show whether a player is currently protected |
Notes:
- Use vanilla
/kill when you intentionally want to kill a protected player
- Command-based configuration only applies to players, not to the
NoDeath name-tag rule
Configuration
Config file path:
config/no-death.json
Default config:
{
"protectAllPlayers": false,
"protectedPlayers": []
}
| Field |
Default |
Description |
protectAllPlayers |
false |
Enables protection for all players |
protectedPlayers |
[] |
UUID list of individually protected players |
Data Storage
Configuration and protection data are stored in:
config/no-death.json
Data characteristics:
- Player protection is persisted
- Individual protection uses UUIDs, so it survives name changes
- Global protection is stored as a separate boolean flag
中文
NoDeath 是一个 Fabric 服务端优先模组,用于控制特定生物和玩家的死亡规则。
核心目标很简单:
- 任何被命名牌命名为
NoDeath 的生物都不会死亡,直到被改名
- 被管理员保护的玩家不会因普通方式死亡
- 被保护玩家只能通过命令击杀或掉入虚空死亡
目录
功能概览
- 命名为
NoDeath 的生物不会死亡
- 生物一旦被改成其他名字,保护立即失效
- 支持通过命令保护单个玩家
- 支持通过命令保护所有玩家
- 被保护玩家不会因普通战斗、环境伤害或其他常规方式死亡
- 被保护玩家仍然允许通过原版
/kill 或掉入虚空死亡
- 保护配置持久化保存到配置文件
- 主逻辑在服务端运行,多人服务器通常只需服务端安装
行为规则
生物规则
- 仅当生物的自定义名称严格等于
NoDeath 时启用保护
- 该规则对原版生物和模组新增生物都生效,只要它们可以被命名
- 保护会阻止最终死亡,而不要求客户端安装模组
- 如果把名字改成其他内容,保护立即移除
玩家规则
- 被保护玩家不会因普通方式死亡
- 以下两种情况仍然允许死亡:
- 开启“全体玩家保护”后,以上规则会应用到所有玩家
兼容性
| 项目 |
要求 |
| Minecraft |
1.21 到 1.21.11 |
| Fabric Loader |
0.16.0+ |
| Java |
21+ |
| Fabric API |
必需 |
| Fabric Language Kotlin |
必需 |
当前工程以 Minecraft 1.21.11 为主目标版本。
依赖
请确保以下依赖与本模组一起安装到对应环境的 mods 目录:
| 依赖 |
是否必需 |
说明 |
| Fabric API |
必需 |
提供 Fabric 事件、命令和运行时 API |
| Fabric Language Kotlin |
必需 |
本模组使用 Kotlin 编写,缺失时无法加载 |
安装方式
服务端优先
本模组优先按服务端模组使用:
- 专用服务器:通常只需服务端安装本模组和依赖,客户端不需要安装
- 单人游戏:仍需本地安装,因为单人模式本质上运行的是内置服务器
命令说明
所有命令默认要求管理员权限。
| 命令 |
说明 |
/nodeath |
查看当前保护概览 |
/nodeath list |
查看当前保护概览 |
/nodeath reload |
重新加载配置文件 |
| `/nodeath all <true |
false>` |
| `/nodeath player <玩家> <true |
false>` |
/nodeath status <玩家> |
查看指定玩家当前是否受保护 |
说明:
- 如需有意杀死受保护玩家,建议直接使用原版
/kill
- 命令配置只控制玩家保护,不控制命名生物规则
配置说明
配置文件路径:
config/no-death.json
默认配置:
{
"protectAllPlayers": false,
"protectedPlayers": []
}
| 字段 |
默认值 |
说明 |
protectAllPlayers |
false |
是否让所有玩家进入保护状态 |
protectedPlayers |
[] |
单独受保护玩家的 UUID 列表 |
数据存储
配置和保护数据保存在:
config/no-death.json
数据特点:
- 玩家保护状态会持久化保存
- 单独保护使用 UUID 保存,避免玩家改名后失效
- 全体保护使用单独布尔开关控制
评论 0
登录后参与评分
还没有评论,来抢沙发吧