Duels 是一款完全基于图形用户界面(GUI)的决斗插件。所有功能均可通过游戏内菜单访问,因此无需使用聊天命令即可进行游戏,当然也提供了完整的命令等效项以方便操作和自动化。
决斗机制
- 通过在菜单中点击玩家头像或使用
/duel <player> 来挑战玩家
- 可以使用自己的物品栏、管理员发布的套件(Kit),或自己保存的个人套件进行战斗
- 可切换的竞技场模式:传送、倒计时、战斗——或者关闭此功能,在开放世界中利用指南针追踪器和实时距离指示器互相追逐猎杀
- 战斗结束瞬间显示清晰的 VICTORY! / DEFEAT 标题和音效——再也不用对着无声的装备交换猜测胜负
- 投降、防断线自动投降以及安全网式的平局超时均由系统自动处理
赌注与 payouts
- 默认情况下赌注是可选的——你可以免费决斗,也可以押上货币并争夺奖池
- 管理员可以一键开启全局强制赌注,要求服务器上的每场决斗都必须押注真实货币
- 获胜者将获得失败者的 奖杯头颅,鼠标悬停时会显示决斗信息和赌注详情
- 支持多货币、每种货币的最小/最大赌注限制,以及仅对赢家的可选税收(退款时不征税)
- 不仅可以押注货币,还可以押注真实物品——将其拖入赌注区域并确认;赢家将拿走双方押注的所有物品,且不征税
决斗规则与最终确认
- 采用 RuneScape 决斗竞技场风格的规则开关,适配 Minecraft 战斗:禁止远程攻击、禁止药水、禁止食物、禁止投降、禁止移动——可在单次决斗或公开挑战中设置
- 在任何使用自身物品或押注物品的决斗开始前,双方都会看到最终确认屏幕——使用自身物品的决斗会镜像显示对手当前穿戴/携带的物品;押注物品的决斗则会并排展示双方的押注物品
- 双方必须点击“Ready”(准备就绪)才能开始战斗;任何一方都可以取消,押注的物品将立即返还
观战与下注
- 公开决斗面板:显示服务器上所有正在进行的决斗,点击即可传送进入观看
- 公开挑战面板:发布无特定目标的挑战——无需选择对手,任何在线玩家都可以接受,类似掷硬币面板风格
- 对任意一名选手进行 pari-mutuel(互彩)观战下注,完全独立于决斗者自身的赌注——没有庄家资金池,奖池只支付投入的金额
套件(Kits)
- 管理员套件和个人套件(每个玩家有可配置的上限),内置真实的拖放式游戏内编辑器,并提供从当前物品栏填充的快捷方式
- 管理员套件同时提供可手动编辑的 YAML 格式,以便在游戏外进行表格样式的批量编辑
- 无论选择哪个套件,双方决斗者都会获得完全相同的副本——从构造上保证公平
公平性与反作弊
- 决斗之外的任何人无法攻击决斗者,决斗者也无法攻击其战斗范围之外的任何人——双向强制执行
- 决斗覆盖土地所有权/区域 PvP 保护,专门针对两名决斗者之间的攻击,因此即使某个区域禁用了 PvP,也不会阻碍双方同意的战斗
- 整个决斗期间容器被锁定(工作台除外),且无法丢弃物品,因此比赛结束后无法隐藏和取回装备
- 真实物品栏会在决斗结束的瞬间快照并安全恢复,无论决斗如何结束——包括跨服务器重启期间的决斗
- 决斗开始时光标上持有的物品会首先折叠进你的物品栏,因此它不会未经清理就进入所谓的相同套件加载状态
统计信息与排行榜
- 生涯胜场、负场、击杀、死亡和连胜记录,并配有游戏内排行榜
- 开箱即用的 YAML 存储,或通过 MySQL 在整个网络中共享一个排行榜
- 完全缓存在内存中——统计数据永远不会因磁盘或数据库往返而阻塞主线程
集成
以下任一插件都不是加载所必需的——Duels 可独立运行,提供友好的(无赌注)决斗且无排行榜占位符。每个插件在被检测到时会自动激活;除了 config.yml 之外无需任何配置。
| 插件 |
角色 |
是否必需? |
| Vault + 任何兼容 Vault 的经济插件(EssentialsX、CMI 等) |
VAULT 提供商的货币后端 |
可选——用于通过 Vault 进行赌注/下注 |
| ExcellentEconomy |
EXCELLENTECONOMY 提供商的货币后端(由其 currency-id 指定的特定货币) |
可选——用于通过 ExcellentEconomy 进行赌注/下注 |
| PlaceholderAPI |
%duels_*% 统计/排行榜占位符 |
可选 |
为未安装的后台配置的货币只是在菜单中隐藏(并在启动时发出警告),直到其可用为止——无论如何,保留在 config.yml 中都是安全的。
命令
/duel - 打开中心菜单
/duel <player> [currency] [amount] - 挑战玩家,可选择预填赌注
/duel accept, /duel deny - 响应待处理的决斗请求
/duel forfeit - 放弃当前决斗
/duel kits - 管理你的个人套件
/duel fights - 打开公开决斗面板
/duel challenges - 发布或接受公开挑战
/duel stats [player] - 查看统计卡片
/duel top [wins|kills|streak] - 打开排行榜
/duel arena - 管理竞技场 (管理员)
/duel kitadmin - 管理服务器套件 (管理员)
/duel reload - 重新加载配置 (管理员)
权限
duels.use - 挑战、接受、保存个人套件以及投降
duels.bet - 对其他玩家的决斗进行观战下注
duels.admin - 管理竞技场、管理服务器套件以及重新加载配置
配置选项 (config.yml)
settings:
request-expire-seconds: 60 # 发送的决斗请求保持待处理状态的时长
open-challenge-expire-seconds: 300 # 发布的公开挑战在面板上停留的时长
find-timeout-seconds: 120 # 自由漫游模式:在取消前寻找并介入的时间
actionbar-tracker: true # 实时显示“距离 X 米 | 剩余 Y 秒”的动作栏(仅限自由漫游模式)
give-compass: true # 追踪指南针(仅限自由漫游模式)
same-world-required: false # 限制决斗仅在同一世界的玩家之间进行
isolate-duel-combat: true # 禁止在决斗内外互相攻击,双向隔离
reset-health-on-start: true # 在开始和结束时将双方决斗者的生命值恢复至满值
broadcast-new-duel: true # 当决斗/公开挑战开始时,在全局聊天中广播公告
broadcast-result: true # 在全局聊天中广播获胜者结果
require-stake: false # 强制每次决斗/挑战必须携带真实赌注
sounds:
enabled: true
request: BLOCK_NOTE_BLOCK_PLING
accept: UI_BUTTON_CLICK
countdown: BLOCK_NOTE_BLOCK_HAT
start: ENTITY_ENDER_DRAGON_GROWL
win: ENTITY_PLAYER_LEVELUP
lose: ENTITY_VILLAGER_NO
arena:
enabled: true
countdown-seconds: 5 # 战斗开始前的移动冻结倒计时
fight-timeout-seconds: 300 # 安全平局超时时间,设为 0 则禁用
betting:
enabled: true
lock-on-fight-start: true # 设为 false 允许在整个战斗期间下注
kits:
max-player-kits: 3 # 玩家可同时保存的个人装备包数量上限
tax:
stake: { enabled: true, percent: 5.0 } # 仅从决斗奖金中扣除,永不退还
bet: { enabled: true, percent: 5.0 } # 仅从观众下注 payout 中扣除
statistics:
storage-type: YAML # 或 MYSQL,用于跨网络共享同一排行榜
leaderboard-refresh-seconds: 60
mysql: { host: localhost, port: 3306, database: duels, username: root, password: '', use-ssl: false, pool-size: 4 }
currencies:
money:
enabled: true
display-name: "Money"
provider: VAULT # 或 EXCELLENTECONOMY(需附加 currency-id)
icon: SUNFLOWER
min-stake: 10.0
max-stake: 100000.0 # 0 表示无限制
quick-amounts: [10, 100, 1000, 10000] # 金额选择器中的快捷按钮
所有面向玩家的聊天消息、GUI 标题和广播信息也存储在单独的 messages.yml 文件中(支持 MiniMessage 格式化和 %placeholder% 占位符)——完全可自定义,无需重启,只需执行 /duel reload 即可。
Duels is a fully GUI-driven duels plugin. Every feature is reachable from the in-game menu, so no chat commands are required to play, though full command equivalents are provided for convenience and automation.
Dueling
- Challenge a player by clicking their head in a menu, or with
/duel <player>
- Fight with your own inventory, an admin-published kit, or your own saved personal kit
- Toggleable arena mode: teleport, countdown, fight - or leave it off and hunt each other down in the open world with a compass tracker and live distance indicator
- A clear VICTORY! / DEFEAT title and sound the instant a fight ends - no more guessing from a silent gear swap
- Forfeit, disconnect-safe auto-forfeit, and a safety-net draw timeout all handled automatically
Wagers & Payouts
- Stakes are optional by default - duel for free, or wager currency on yourself and take the pot
- Admins can flip one switch to require a real wager on every duel server-wide
- The winner is handed a trophy head of the loser, with hover text noting the duel and the wager
- Multi-currency support, per-currency min/max stakes, and an optional tax on winnings only (never on a refund)
- Stake real items too, not just currency - drag them into a stake area and confirm; the winner takes everything staked by both sides, no tax
Duel Rules & Final Confirmation
- RuneScape Duel Arena-style rule toggles, adapted to Minecraft combat: No Ranged, No Potions, No Food, No Forfeit, No Movement - set per duel or open challenge
- Before any own-items or item-staked duel begins, both players get a final confirmation screen - an own-items duel mirrors exactly what the opponent is currently wearing/carrying, an item-staked duel lays out both sides' staked items side by side
- Both must click Ready before the fight starts; either can cancel, returning any staked items instantly
Spectating & Betting
- Open Fights board: every live duel on the server, one click to teleport in and watch
- Open Challenges board: post an un-targeted challenge - no need to pick an opponent, anyone online can accept it, coinflip-board style
- Parimutuel spectator betting on either fighter, completely separate from the duelists' own stake - no house bankroll, the pool only ever pays out what was put in
Kits
- Admin kits and personal kits (up to a configurable cap per player), built in a real drag-and-drop in-game editor with a fill-from-current-inventory shortcut
- Admin kits also ship in a hand-editable YAML format for spreadsheet-style bulk editing outside the game
- Both duelists always get an identical copy of whichever kit is picked - fully fair by construction
Fairness & Anti-Cheat
- Nobody outside a duel can hit a duelist, and a duelist can't hit anyone outside their own fight - enforced in both directions
- A duel supersedes land-claim/region PvP protection for hits between the two duelists specifically, so a PvP-disabled claim can't stall a fight either side agreed to
- Containers are locked for the whole duel (crafting tables excepted) and items can't be dropped, so gear can't be stashed and retrieved after the match
- Real inventories are snapshotted and safely restored the instant a duel ends, however it ends - including across a server restart mid-duel
- An item held on your cursor the instant a duel starts is folded into your inventory first, so it can't ride into a supposedly identical kit loadout untouched by the wipe
Statistics & Leaderboards
- Lifetime wins, losses, kills, deaths, and streaks with an in-game leaderboard
- YAML storage out of the box, or MySQL to share one leaderboard across a whole network
- Fully cached in memory - stats never block the main thread on a disk or database round-trip
Integrations
None of these are required to load - Duels works standalone with friendly (no-stakes) duels and no leaderboard placeholders. Each one activates automatically the moment it's detected; nothing to configure beyond config.yml.
| Plugin |
Role |
Required? |
| Vault + any Vault-compatible economy (EssentialsX, CMI, etc.) |
Currency backend for the VAULT provider |
Optional - needed for wagers/bets via Vault |
| ExcellentEconomy |
Currency backend for the EXCELLENTECONOMY provider (a specific currency by its currency-id) |
Optional - needed for wagers/bets via ExcellentEconomy |
| PlaceholderAPI |
%duels_*% stat/leaderboard placeholders |
Optional |
A currency configured for a backend that isn't installed is simply hidden from menus (with a startup warning) until it becomes available - safe to leave in config.yml either way.
Commands
/duel - open the hub menu
/duel <player> [currency] [amount] - challenge a player, optionally pre-filling a stake
/duel accept, /duel deny - respond to a pending duel request
/duel forfeit - concede your current duel
/duel kits - manage your personal kits
/duel fights - open the Open Fights board
/duel challenges - post or accept an open challenge
/duel stats [player] - view a stats card
/duel top [wins|kills|streak] - open the leaderboard
/duel arena - manage arenas (administrator)
/duel kitadmin - manage server kits (administrator)
/duel reload - reload the configuration (administrator)
Permissions
duels.use - challenge, accept, save personal kits, and forfeit
duels.bet - place spectator bets on other players' duels
duels.admin - manage arenas, manage server kits, and reload the configuration
Configuration options (config.yml)
settings:
request-expire-seconds: 60 # how long a sent duel request stays pending
open-challenge-expire-seconds: 300 # how long a posted open challenge stays on the board
find-timeout-seconds: 120 # free-roam mode: time to find & engage before cancel
actionbar-tracker: true # live "Xm away | Ys left" action bar (free-roam only)
give-compass: true # tracking compass (free-roam only)
same-world-required: false # restrict duels to same-world opponents only
isolate-duel-combat: true # no hits in/out of a duel from outside it, in either direction
reset-health-on-start: true # heal both duelists to full at start and end
broadcast-new-duel: true # global chat announcement when a duel/open challenge starts
broadcast-result: true # global chat announcement of the winner
require-stake: false # force every duel/challenge to carry a real wager
sounds:
enabled: true
request: BLOCK_NOTE_BLOCK_PLING
accept: UI_BUTTON_CLICK
countdown: BLOCK_NOTE_BLOCK_HAT
start: ENTITY_ENDER_DRAGON_GROWL
win: ENTITY_PLAYER_LEVELUP
lose: ENTITY_VILLAGER_NO
arena:
enabled: true
countdown-seconds: 5 # movement-frozen countdown before a fight starts
fight-timeout-seconds: 300 # safety-net draw timeout, 0 disables it
betting:
enabled: true
lock-on-fight-start: true # false allows betting for the whole fight
kits:
max-player-kits: 3 # personal kits a player may save at once
tax:
stake: { enabled: true, percent: 5.0 } # taken from duel winnings only, never a refund
bet: { enabled: true, percent: 5.0 } # taken from spectator bet payouts only
statistics:
storage-type: YAML # or MYSQL, to share one leaderboard across a network
leaderboard-refresh-seconds: 60
mysql: { host: localhost, port: 3306, database: duels, username: root, password: '', use-ssl: false, pool-size: 4 }
currencies:
money:
enabled: true
display-name: "Money"
provider: VAULT # or EXCELLENTECONOMY (+ currency-id)
icon: SUNFLOWER
min-stake: 10.0
max-stake: 100000.0 # 0 = unlimited
quick-amounts: [10, 100, 1000, 10000] # +buttons in the amount picker
Every player-facing chat message, GUI title, and broadcast also lives in a separate messages.yml (MiniMessage formatting, %placeholder% support) - fully customizable without a restart, just /duel reload.
评论 0
登录后参与评分
还没有评论,来抢沙发吧