DuelClub
在已有生存服务器的玩家间进行 PvP 俱乐部风格的决斗。
/duel <player> <kit> 发送挑战。对方点击接受后,两名玩家会被拉入一个私人竞技场,获得固定的装备,经历五秒倒计时,结束后被精确放回原本站立的位置。
无需客户端模组。无需建造竞技场。无需第二个服务器。
无需配置
竞技场世界会在插件首次加载时自动生成。将 jar 文件放入 plugins/ 目录,重启服务器即可。
竞技场按需惰性生成,彼此间隔 512 个方块,建立在由隐形屏障墙环绕的石质平台上。默认同时运行 8 个竞技场。
不影响生存模式
这是如果你要在人们在乎的生存世界中添加决斗功能时最关键的部分。
- 无人死亡。 击杀判定会被拦截并取消。没有死亡屏幕、没有掉落物品、没有经验丢失、没有死亡消息。
- 一切复原。 进入时快照记录背包、护甲、副手物品、药水效果、生命值、最大生命值属性、饥饿度、饱和度、经验值、游戏模式、飞行状态和精确位置,退出时全部恢复。
- 防崩溃。 决斗开始时快照会写入磁盘。如果服务器在决斗期间崩溃,下次玩家登录时会自动恢复。
- 防断线。 如果在决斗期间登出,系统会在保存玩家数据之前先恢复你的生存背包,并将胜利判给对手。
- 竞技场自我修复。 建筑套件可以放置方块;每次竞技场释放时,所有放置的方块都会被还原。玩家只能破坏自己放置的方块,遗留的物品、箭矢和投掷药水会被清理。
- 隔离保护。 阻止从竞技场传出或使用末影珍珠离开,非决斗者在竞技场世界中不受伤害,爆炸无法破坏竞技场方块,且决斗期间命令仅限配置允许的白名单。
套件
NoDebuff · Debuff · Gapple · Sword · Axe · Classic · Boxing · Build UHC
所有套件均为纯配置文件。修改装备列表、添加自定义套件或删除不需要的套件,然后执行 /duel admin reload。
每个套件支持以下规则:禁止建筑、自然生命恢复、饥饿消耗、最大生命值限制,以及一种拳击模式(伤害归零,率先造成 N 次命中者获胜)。
kits:
mykit:
display: "My Kit"
natural-regen: false
armor:
helmet: {material: DIAMOND_HELMET, enchants: {protection: 2}, unbreakable: true}
items:
- {slot: 0, material: DIAMOND_SWORD, enchants: {sharpness: 1}, unbreakable: true}
fill: {material: SPLASH_POTION, potion: strong_healing, splash: true}
物品支持 slot、amount、name、lore、enchants、potion、splash、unbreakable 和 flags,以及一个 fill 块——它会将一个物品复制到所有空槽位中(这就是 NoDebuff 如何获得 34 瓶药水的原理)。
命令
| 命令 |
功能 |
/duel <player> <kit> |
向某人发起挑战 |
/duel <player> |
同上,附带可点击的套件选择器 |
/duel accept [player] |
接受挑战 |
/duel deny [player] |
拒绝挑战(不带参数则拒绝所有) |
/duel cancel |
撤回你发出的待处理挑战 |
/duel forfeit |
放弃当前正在进行的决斗 |
/duel kits |
列出游戏模式 |
/duel stats [player] |
查看胜/负/平记录 |
/spectate <player> |
观看实时决斗 |
/spectate leave |
停止观看 |
/duel admin reload|arenas|stop <player> |
仅限管理员操作 |
别名:/d, /duels, /spec
| 权限 |
默认赋予对象 |
duelclub.duel |
所有人 |
duelclub.spectate |
所有人 |
duelclub.admin |
管理员 |
决斗期间
实时动作栏显示对手的剩余心数和你的当前连击数。当你被击中或挥空时,连击中断。
决斗结束后,双方都会收到摘要,包括命中次数、最佳连击数和持续时间。胜/负/平记录持久保存,可通过 /duel stats 查看。
配置
settings:
arena-world: duelclub_arenas
arena-count: 8 # 并发决斗数量
request-timeout: 60 # 挑战有效时长(秒)
countdown: 5 # FIGHT 前的冻结秒数
time-limit: 300 # 0 表示禁用;超时后命中多者获胜
end-delay: 4 # 结果产生后留在竞技场内的秒数
要求
Paper 1.21.11 或其分支。Java 21 或更高版本。无依赖项,无需客户端模组,未打包任何阴影库。
已知限制
提前说明以避免意外:
- 仅在 1.21.11 上测试过。可能在附近的 1.21.x 版本上运行,但未经测试。
- 不兼容 Folia。
- 与其他挂钩相同事件的插件共存时未经测试——区域保护、传送管理器和世界管理器是潜在的冲突点。
- 无排队或匹配系统。仅支持直接挑战。
- 任何未命中的挥臂动作都会重置连击,因此在 Build UHC 套件中挖掘会打断你的连击。
- 竞技场为固定生成的平台。尚不支持自定义或按套件划分的竞技场布局。
许可证
MIT。
DuelClub
PvP-club style duels inside a server people are already playing survival on.
/duel <player> <kit> sends a challenge. They click accept. Both players are pulled into a private arena, handed a fixed loadout, given a five second countdown, and put back exactly where they were standing when it ends.
No client mod. No arena building. No second server.
No setup required
The arena world generates itself the first time the plugin loads. Drop the jar in plugins/, restart, done.
Arenas are built lazily as they're needed, 512 blocks apart, on stone platforms ringed by invisible barrier walls. Eight run at once by default.
It does not touch survival
This is the part that matters if you're adding duels to a world people care about.
- Nobody dies. The killing blow is intercepted and cancelled. No death screen, no dropped items, no lost XP, no death message.
- Everything is restored. Inventory, armor, offhand, potion effects, health, max-health attribute, hunger, saturation, XP, gamemode, flight and exact position are snapshotted on entry and put back on exit.
- Crash safe. Snapshots are written to disk when a duel starts. If the server is killed mid-duel, players are restored automatically the next time they log in.
- Disconnect safe. Logging out mid-duel restores your survival inventory before your player data is written, and hands your opponent the win.
- Arenas repair themselves. Build kits can place blocks; every one is reverted when the arena frees up. Players can only break what they placed, and leftover items, arrows and thrown potions are swept.
- Sealed off. Teleports and ender pearls out of the arena are blocked, non-duellists take no damage in the arena world, explosions can't break arena blocks, and commands are limited to a configurable allowlist mid-duel.
Kits
NoDebuff · Debuff · Gapple · Sword · Axe · Classic · Boxing · Build UHC
All of them are plain config. Change the loadouts, add your own, or delete the ones you don't want, then /duel admin reload.
Per-kit rules: block building, natural regen, hunger drain, max health, and a boxing mode where damage is nullified and first to N hits wins.
kits:
mykit:
display: "My Kit"
natural-regen: false
armor:
helmet: {material: DIAMOND_HELMET, enchants: {protection: 2}, unbreakable: true}
items:
- {slot: 0, material: DIAMOND_SWORD, enchants: {sharpness: 1}, unbreakable: true}
fill: {material: SPLASH_POTION, potion: strong_healing, splash: true}
Items support slot, amount, name, lore, enchants, potion, splash, unbreakable and flags, plus a fill block that copies one item into every empty slot — that's how NoDebuff gets its 34 pots.
Commands
| Command |
What it does |
/duel <player> <kit> |
Challenge someone |
/duel <player> |
Same, with a clickable kit picker |
/duel accept [player] |
Accept a challenge |
/duel deny [player] |
Decline (no argument declines all) |
/duel cancel |
Withdraw your outstanding challenges |
/duel forfeit |
Give up the duel you're in |
/duel kits |
List the game modes |
/duel stats [player] |
Win / loss / draw record |
/spectate <player> |
Watch a live duel |
/spectate leave |
Stop watching |
/duel admin reload|arenas|stop <player> |
Operators only |
Aliases: /d, /duels, /spec
| Permission |
Default |
duelclub.duel |
everyone |
duelclub.spectate |
everyone |
duelclub.admin |
operators |
During the duel
A live action bar shows your opponent's remaining hearts and your current combo. Combos break when you get hit or when a swing misses.
When it ends, both players get a summary with hit counts, best combo and duration. Win/loss/draw records persist and are readable with /duel stats.
Configuration
settings:
arena-world: duelclub_arenas
arena-count: 8 # concurrent duels
request-timeout: 60 # seconds a challenge stays valid
countdown: 5 # frozen seconds before FIGHT
time-limit: 300 # 0 disables; on timeout most hits wins
end-delay: 4 # seconds in-arena after the result
Requirements
Paper 1.21.11 or a fork of it. Java 21 or newer. No dependencies, no client mod, nothing shaded.
Known limitations
Stated up front so nobody is surprised:
- Only tested against 1.21.11. It may run on nearby 1.21.x builds, but that is untested.
- Not Folia compatible.
- Untested alongside other plugins that hook the same events — region protection, teleport managers and world managers are the likely friction points.
- No queue or matchmaking. Duels are direct challenges only.
- Combos reset on any arm swing that doesn't land, so on the Build UHC kit mining breaks your combo.
- Arenas are a fixed generated platform. Custom or per-kit arena layouts are not supported yet.
License
MIT.
评论 0
登录后参与评分
还没有评论,来抢沙发吧