Deathrun 插件
适用于 Paper 1.20.2+ 的 Minecraft Deathrun 插件。玩家沿一个基本方向竞速——每失去一点生命值都是永久性的,走廊由移动的世界边界强制划定,记分板实时追踪所有参与者的距离。
概念
所有玩家都从一个玻璃笼中开始。倒计时结束后,石灰色的玻璃前墙打开,所有人按照配置的跑步方向(例如北方)冲刺。生命恢复完全禁用——受到的所有伤害都是永久性的。每个跑者都有一个专属的世界边界跟随其后,超出走廊范围会造成伤害。跑得最远的玩家获胜。
要求
- Paper 1.20.2 或更高版本(参见 版本兼容性)
- Java 21
- Maven 3.6+
版本兼容性
| JAR |
Paper 版本 |
分支 |
Deathrun-x.x.x.jar |
1.20.2 – 最新版本 |
main |
Deathrun-x.x.x-legacy.jar |
1.16.5 – 1.20.1 |
legacy-1.16 |
旧版 JAR 在功能上完全相同,只有两个视觉差异:笼子地板使用黑曜石而非加固深板岩,且记分板标题使用旧版颜色格式。
构建
mvn clean package
编译后的 JAR 文件位于 target/Deathrun.jar。将其复制到服务器的 plugins/ 文件夹中。
如果你没有安装 Maven,可以从 maven.apache.org 下载,或通过包管理器安装:
# macOS (Homebrew)
brew install maven
# Windows (Chocolatey)
choco install maven
# Debian / Ubuntu
sudo apt install maven
设置流程
- 启动服务器——只有 OP 可以加入(服务器列表中显示维护模式)
- 以 OP 身份加入,站在所需的笼子位置,运行
/dr buildcage
- 笼子已建成,出生点和测量起点自动设置
- 区域内的所有生物和物品掉落物会自动清除
- 可选:通过
/dr setdirection 调整方向——指示墙会实时移动
- 运行
/dr open 允许所有玩家加入
- 玩家加入并看到大厅记分板
- 运行
/dr start 开始倒计时
- 比赛结束后,使用
/dr stop 重置以进行下一轮
命令
大多数命令需要 deathrun.admin 权限(默认:OP)。/dr goto 对所有玩家可用。
| 命令 |
权限 |
描述 |
/dr buildcage |
deathrun.admin |
在你所在位置建造笼子,设置出生点及测量点 [Player] |
/dr removecage |
deathrun.admin |
移除笼子并恢复原始地形 [Player] |
/dr open |
deathrun.admin |
向所有玩家开放服务器 |
/dr close |
deathrun.admin |
锁定服务器(仅限 OP) |
/dr start |
deathrun.admin |
开始倒计时 |
/dr stop |
deathrun.admin |
中止当前游戏 / 在游戏结束后重置 |
/dr pause |
deathrun.admin |
暂停或恢复游戏 |
/dr goto |
everyone |
传送到获胜者的位置(仅在游戏结束后可用) [Player] |
/dr setcorridor <n> |
deathrun.admin |
设置走廊半宽(方块数,默认值:30) |
/dr setdirection <dir> |
deathrun.admin |
设置跑步方向:NORTH / SOUTH / EAST / WEST |
/dr settime <min> |
deathrun.admin |
设置时间限制(分钟,0 = 无限制) |
/dr status |
deathrun.admin |
显示当前配置 |
配置
plugins/Deathrun/config.yml:
# Language / Sprache
# de, en, fr, es, ... – one language for all players
# auto – each player sees their Minecraft client language
language: de
server-name: "DeathRun" # Scoreboard title
direction: NORTH # Run direction
corridor-width: 30 # WorldBorder half-width (blocks left/right)
countdown: 10 # Countdown in seconds before race start
# PvP settings
pvp: false # Enable PvP between participants
pvp-delay: 30 # Seconds after race start before PvP activates (0 = immediately)
pvp-countdown: 5 # Seconds of countdown warning before PvP activates
max-time: 0 # Time limit in minutes (0 = no limit)
border-damage-per-block: 0.5 # Damage per block outside border per second
border-damage-buffer: 0.0 # Grace distance before border deals damage
# Cage settings
cage:
radius: 3 # Base cage radius (actual width = radius × 3)
built: false # Set automatically by the plugin – do not edit
# Set automatically by /dr buildcage:
start:
world: world
x: 0.0
y: 64.0
z: 0.0
spawn:
world: world
x: 0.5
y: 64.0
z: 0.5
yaw: 180.0
笼子行为
- 建筑:
/dr buildcage 清除区域(不掉落物品/植物),移除该区域内的所有生物和动物,并构建一个面向运行方向的石灰玻璃墙笼子。
- 方向指示: 石灰玻璃墙始终面向运行方向。当笼子已存在时,运行
/dr setdirection 会就地更新墙壁而无需重新构建。
- 地形恢复:
/dr removecage 使用预建快照恢复原始方块。如果自建造笼子以来服务器已重启,则应用回退方案:墙壁和天花板 → 空气,地板顶层 → 草方块,地板下层 → 泥土。
- 方块保护: 笼子的方块对所有玩家始终不可破坏。在暂停期间,参与者也不能破坏或放置任何方块。
- 持久化: 笼子状态保存至
config.yml(cage.built)。服务器重启后,插件会自动重新注册所有笼子位置——/dr start、/dr removecage 和方块保护功能无需重新构建即可立即生效。
PvP 延迟
当设置 pvp: true 时,PvP 不会在比赛开始时立即激活。延迟系统工作流程如下:
- 比赛开始时:"⚔ PvP 将在 30 秒后激活!"
- 在
pvp-delay - pvp-countdown 秒时:开始每秒倒计时广播
- 在
pvp-delay 秒时:"⚔ PvP 现已激活!"
PvP 仅在活跃且未暂停的比赛期间激活。它在比赛开始前、暂停期间以及游戏结束后自动禁用。当游戏暂停时,延迟计时器也会暂停,并在取消暂停时恢复。设置 pvp-delay: 0 可在 GO 信号发出时立即激活 PvP。
昼夜与天气循环
昼夜和天气循环由插件自动控制:
| 状态 |
循环 |
| IDLE / STARTING / ENDED |
冻结 |
| RUNNING (active) |
运行中 |
| RUNNING (paused) |
冻结 |
多语言支持
插件自带 19 种语言。所有捆绑的语言文件提取到 plugins/Deathrun/lang/,并在每次服务器启动时覆盖更新以保持最新。如果您想自定义捆绑语言,请创建一个具有不同代码的新文件(例如 en_custom.yml)——这些文件永远不会被覆盖。
| 代码 |
语言 |
代码 |
语言 |
de |
Deutsch |
ru |
Русский |
en |
English |
zh |
简体中文 |
fr |
Français |
ja |
日本語 |
es |
Español |
ko |
한국어 |
pt |
Português |
tr |
Türkçe |
it |
Italiano |
sv |
Svenska |
nl |
Nederlands |
cs |
Čeština |
pl |
Polski |
hu |
Magyar |
uk |
Українська |
ro |
Română |
fi |
Suomi |
|
|
模式:
language: de(或其他代码)—— 所有人都会看到该语言,无论客户端设置如何
language: auto —— 每位玩家在其 Minecraft 客户端语言下查看文本;如果不可用则回退到英语
添加自定义语言: 在 plugins/Deathrun/lang/ 中放置一个新的 xx.yml 文件(例如 ar.yml),使用与 en.yml 相同的键结构。使用 language: auto 时,它会在下次服务器启动时自动加载。
记分板与标签页列表
记分板状态:
| 状态 |
显示内容 |
| 服务器锁定,无笼子 |
OP 的设置说明 |
| 服务器锁定,笼子已构建 |
提示执行 /dr open 或 /dr removecage |
| 服务器开放,等待中 |
"Waiting for /dr start" + 玩家数量 |
| 倒计时 |
实时倒计时 + 参与者列表 |
| 比赛进行中 |
前 5 名、个人排名 / 距离 / 横向偏移(L/R)/ 计时器 |
| 游戏结束 |
前 5 名 + 获胜者 + 个人排名,直到执行 /dr stop 才消失 |
标签页列表 显示每位参与者的排名、姓名、距离、存活/死亡图标以及当前生命值(颜色编码:绿色 > 6 ❤,黄色 3–6 ❤,红色 < 3 ❤)。死亡玩家不显示生命值。
服务器列表 MOTD
服务器列表条目会根据游戏状态自动更改(文本遵循配置的语言):
[Maintenance] — 服务器锁定(设置阶段)
[Countdown] — 倒计时进行中
[Running] — 比赛进行中
[Ended] — 游戏结束,结果可用
游戏规则
- 生命值: 再生完全禁用。所有伤害均为永久性的。
- 走廊: 每个玩家的 WorldBorder 跟随每位奔跑者,并在走廊外造成可配置的伤害。
- 分数: 从笼子外墙沿运行方向移动的方块数。
- 结束条件: 当所有玩家死亡,或最后一名幸存者超越最高死亡玩家的分数时,游戏结束。
- 断开连接: 断开连接的玩家标记为缺席(非死亡),可以重新连接以继续比赛。
- 迟到加入者: 在游戏进行时被阻止加入。管理员始终可以加入。
- 游戏结束后: 无伤害,无生物攻击。一条可点击的聊天消息允许所有人传送到获胜者的位置。
暂停模式
/dr pause 冻结所有参与者的游戏:
- 移动锁定(仍允许垂直移动)
- 无伤害,无生物攻击
- 昼夜和天气循环冻结
- PvP 延迟计时器冻结
- 禁止所有库存交互、物品使用、攻击、投射物、掉落物拾取和方块放置/破坏
- 所有参与者可见的
⏸ PAUSE 动作栏
包
de.flyingfinger.minecraft.deathrun
许可证
MIT
Deathrun Plugin
A Minecraft Deathrun plugin for Paper 1.20.2+. Players race in one cardinal direction — every heart lost is permanent, the corridor is enforced by a moving WorldBorder, and the scoreboard tracks live distances for all participants.
Concept
All players start inside a glass cage. When the countdown ends, the lime-glass front wall opens and everyone sprints in the configured run direction (e.g. North). Health regeneration is completely disabled — every point of damage is permanent. A per-player WorldBorder follows each runner and deals damage outside the corridor. The player who travels the furthest wins.
Requirements
Version Compatibility
| JAR |
Paper versions |
Branch |
Deathrun-x.x.x.jar |
1.20.2 – latest |
main |
Deathrun-x.x.x-legacy.jar |
1.16.5 – 1.20.1 |
legacy-1.16 |
The legacy JAR is functionally identical with two visual differences: the cage floor uses Obsidian instead of Reinforced Deepslate, and scoreboard titles use legacy color formatting.
Building
mvn clean package
The compiled JAR is placed in target/Deathrun.jar. Copy it to your server's plugins/ folder.
If you don't have Maven installed, you can download it from maven.apache.org or install it via a package manager:
# macOS (Homebrew)
brew install maven
# Windows (Chocolatey)
choco install maven
# Debian / Ubuntu
sudo apt install maven
Setup Workflow
- Start the server — only OPs can join (maintenance mode shown in server list)
- Join as OP, stand at the desired cage location, run
/dr buildcage
- Cage is built, spawn point and measurement start are set automatically
- All mobs and item drops in the area are removed automatically
- Optionally adjust direction with
/dr setdirection — the indicator wall moves live
- Run
/dr open to allow all players to join
- Players join and see the lobby scoreboard
- Run
/dr start to begin the countdown
- After the race, use
/dr stop to reset for the next round
Commands
Most commands require the deathrun.admin permission (default: OP). /dr goto is available to all players.
| Command |
Permission |
Description |
/dr buildcage |
deathrun.admin |
Builds the cage at your position, sets spawn & measurement point [Player] |
/dr removecage |
deathrun.admin |
Removes the cage and restores the original terrain [Player] |
/dr open |
deathrun.admin |
Opens the server for all players |
/dr close |
deathrun.admin |
Locks the server (OPs only) |
/dr start |
deathrun.admin |
Starts the countdown |
/dr stop |
deathrun.admin |
Aborts the current game / resets after game ends |
/dr pause |
deathrun.admin |
Pauses or resumes the game |
/dr goto |
everyone |
Teleports to the winner's location (only available after game ends) [Player] |
/dr setcorridor <n> |
deathrun.admin |
Sets corridor half-width in blocks (default: 30) |
/dr setdirection <dir> |
deathrun.admin |
Sets run direction: NORTH / SOUTH / EAST / WEST |
/dr settime <min> |
deathrun.admin |
Sets time limit in minutes (0 = no limit) |
/dr status |
deathrun.admin |
Shows current configuration |
Configuration
plugins/Deathrun/config.yml:
# Language / Sprache
# de, en, fr, es, ... – one language for all players
# auto – each player sees their Minecraft client language
language: de
server-name: "DeathRun" # Scoreboard title
direction: NORTH # Run direction
corridor-width: 30 # WorldBorder half-width (blocks left/right)
countdown: 10 # Countdown in seconds before race start
# PvP settings
pvp: false # Enable PvP between participants
pvp-delay: 30 # Seconds after race start before PvP activates (0 = immediately)
pvp-countdown: 5 # Seconds of countdown warning before PvP activates
max-time: 0 # Time limit in minutes (0 = no limit)
border-damage-per-block: 0.5 # Damage per block outside border per second
border-damage-buffer: 0.0 # Grace distance before border deals damage
# Cage settings
cage:
radius: 3 # Base cage radius (actual width = radius × 3)
built: false # Set automatically by the plugin – do not edit
# Set automatically by /dr buildcage:
start:
world: world
x: 0.0
y: 64.0
z: 0.0
spawn:
world: world
x: 0.5
y: 64.0
z: 0.5
yaw: 180.0
Cage Behaviour
- Building:
/dr buildcage clears the area (no item/plant drops), removes all mobs and animals in the zone, and builds the cage with a lime-glass wall facing the run direction.
- Direction indicator: The lime-glass wall always faces the run direction. Running
/dr setdirection while a cage is standing updates the wall in-place without rebuilding.
- Terrain restoration:
/dr removecage restores the original blocks using a pre-build snapshot. If the server was restarted since the cage was built, the fallback applies: walls and ceiling → air, floor top → grass, floor below → dirt.
- Block protection: Cage blocks are indestructible at all times for all players. During pause, no blocks can be broken or placed by participants either.
- Persistence: The cage state is saved to
config.yml (cage.built). After a server restart the plugin re-registers all cage positions automatically — /dr start, /dr removecage, and block protection all work immediately without rebuilding.
PvP Delay
When pvp: true is set, PvP is not active immediately at race start. The delay system works as follows:
- At race start: "⚔ PvP activates in 30 seconds!"
- At
pvp-delay - pvp-countdown seconds: per-second countdown broadcast begins
- At
pvp-delay seconds: "⚔ PvP is now active!"
PvP is only ever active during an active, unpaused race. It is automatically disabled before the race, during pause, and after the game ends. The delay timer also pauses when the game is paused and resumes on unpause. Set pvp-delay: 0 to activate PvP immediately at the GO signal.
Day/Night & Weather Cycle
The day/night and weather cycles are controlled automatically:
| State |
Cycle |
| IDLE / STARTING / ENDED |
Frozen |
| RUNNING (active) |
Running |
| RUNNING (paused) |
Frozen |
Multilingual Support
The plugin ships with 19 languages. All bundled language files are extracted to plugins/Deathrun/lang/ and overwritten on every server start to keep them up to date. If you want to customise a bundled language, create a new file with a different code (e.g. en_custom.yml) — those are never overwritten.
| Code |
Language |
Code |
Language |
de |
Deutsch |
ru |
Русский |
en |
English |
zh |
简体中文 |
fr |
Français |
ja |
日本語 |
es |
Español |
ko |
한국어 |
pt |
Português |
tr |
Türkçe |
it |
Italiano |
sv |
Svenska |
nl |
Nederlands |
cs |
Čeština |
pl |
Polski |
hu |
Magyar |
uk |
Українська |
ro |
Română |
fi |
Suomi |
|
|
Modes:
language: de (or any code) — everyone sees that language, regardless of client settings
language: auto — each player sees texts in their Minecraft client language; falls back to English if unavailable
Adding a custom language: Place a new xx.yml file (e.g. ar.yml) in plugins/Deathrun/lang/ using the same key structure as en.yml. With language: auto it is picked up automatically on the next server start.
Scoreboard & Tab List
Scoreboard states:
| State |
Display |
| Server locked, no cage |
Setup instructions for OP |
| Server locked, cage built |
Prompt to /dr open or /dr removecage |
| Server open, waiting |
"Waiting for /dr start" + player count |
| Countdown |
Live countdown + participant list |
| Race running |
Top 5, personal rank / distance / lateral offset (L/R) / timer |
| Game ended |
Top 5 + winner + personal rank, persists until /dr stop |
Tab list shows each participant's rank, name, distance, alive/dead icon, and current hearts (color-coded: green > 6 ❤, yellow 3–6 ❤, red < 3 ❤). Dead players show no heart count.
Server List MOTD
The server list entry changes automatically based on game state (text follows the configured language):
[Maintenance] — Server locked (setup phase)
[Countdown] — Countdown running
[Running] — Race in progress
[Ended] — Game ended, results available
Game Rules
- Health: Regeneration is fully disabled. All damage is permanent.
- Corridor: A per-player WorldBorder follows each runner and deals configurable damage outside the corridor.
- Score: Blocks traveled in the run direction from the cage's outer wall.
- End condition: Game ends when all players are dead, or the last survivor overtakes the highest dead player's score.
- Disconnects: A disconnected player is marked as absent (not dead) and can reconnect to continue racing.
- Late joiners: Blocked during an active game. Admins can always join.
- After game ends: No damage, no mob targeting. A clickable chat message lets everyone teleport to the winner's position.
Pause Mode
/dr pause freezes the game for all participants:
- Movement locked (vertical movement still allowed)
- No damage, no mob targeting
- Day/night and weather cycle frozen
- PvP delay timer frozen
- All inventory interaction, item use, attacking, projectiles, drops, pickups and block placing/breaking blocked
- Visible
⏸ PAUSE action bar for all participants
Package
de.flyingfinger.minecraft.deathrun
License
MIT
评论 0
登录后参与评分
还没有评论,来抢沙发吧