⚔️ pvpOption
自愿加入的 PvP 模式
在大多数服务器上,PvP(玩家对战)只是一个单一的开关:要么对所有人开启,要么对所有人关闭。pvpOption 将其替换为基于每个玩家的、自愿加入的标志。只有在你选择开启时,你才会对其他同样选择开启的玩家造成或承受玩家对战伤害。其他玩家则完全受到保护。不再有意外击打,不再有你“不是故意挥剑”的借口,也不再有当你只想建造时却被偷袭的情况。
? 1.5.5 新增: 一个 JAR 文件现在支持所有 Minecraft 26.x 版本——26.1、26.1.1、26.1.2、26.2 和 26.3。
✨ 功能
- ⚔️ 通过一条命令加入。
/pvp 开启你的标志。首先会有一段短暂的准备时间倒计时——这是一个宽限期,防止别人瞬间伏击你——然后你的标志生效。
- ? 双方必须同意。 只有当攻击者和防御者都开启了标志时,攻击才会命中。如果攻击未开启标志的玩家,攻击将被取消,并显示消息告知原因。
- ⏱️ 战斗冷却期确保公平。 每次有效命中都会在双方身上启动一个战斗计时器。你不能在战斗中解除标志并逃跑——你必须直到计时器结束才能离开。
- ? 可选的自动解除标志。 管理员可以在玩家长时间不活跃后悄悄移除其标志,这样那些忘记输入
/pvp off 的玩家就不会永远处于可被攻击状态。
- ? 实时动作栏 HUD。 一目了然地查看你的当前状态——准备时间倒计时、⚔ PvP 已激活以及剩余的战斗冷却时间。
- ? 可选的全服广播。 当玩家进入或离开 PvP 模式时进行全服公告,让每个人都知道谁是可以攻击的目标。
- ?️ 完整的管理员控制。 切换整个系统,实时调整准备时间/冷却时间/自动解除标志,强制开启或关闭某玩家的标志,并锁定问题玩家使其完全无法加入 PvP。
- ? 持久化的 UUID 状态。 标志和管理员锁定在重启后依然存在。不需要新方块,不需要物品,不需要客户端模组。
⌨️ 命令
根命令是 /pvpoption,/pvp 是其简短别名。单独运行它会切换你自己的标志。
玩家命令
| 命令 |
作用 |
/pvp |
切换你自己的 PvP 标志的开或关。 |
/pvp on |
加入——开始准备时间,然后标记你。 |
/pvp off |
退出——取消待处理的准备时间,或移除你的标志(在战斗冷却期间会被阻止)。 |
/pvp status |
显示你自己的标志状态,以及任何剩余的战斗冷却时间。 |
/pvp list |
列出所有当前已开启 PvP 标志的玩家(以及在战斗中的玩家)。 |
管理员命令
所有管理员子命令都在 /pvp admin … 下,并且需要操作员 / 游戏管理员权限(等级 2+)。
| 命令 |
作用 |
/pvp admin |
显示当前的管理员设置。 |
/pvp admin enable | disable |
在全服范围内开启或关闭整个 PvP 系统。 |
/pvp admin warmup [seconds] |
显示或设置加入的准备时间,单位为秒(0 = 即时)。 |
/pvp admin cooldown [seconds] |
显示或设置战斗冷却时间,单位为秒(0 = 禁用)。 |
/pvp admin autoUnflag [minutes] |
显示或设置空闲自动解除标志的时间,单位为分钟(0 = 禁用)。 |
/pvp admin broadcast on | off |
切换“进入/离开 PvP 模式”的公告。 |
/pvp admin disableRepair on | off |
切换已标志玩家的 expRepair 修复抑制。 |
/pvp admin reload [silent] |
从磁盘重新加载配置文件(silent 仅向你广播)。 |
/pvp admin set <player> on | off |
强制开启或关闭某玩家的标志。 |
/pvp admin status <player> |
检查另一名玩家的标志、冷却时间和锁定状态。 |
/pvp admin lock <player> |
移除玩家的标志并限制其加入 PvP。 |
/pvp admin unlock <player> |
解除限制并恢复玩家的 PvP 访问权限。 |
⚙️ 配置
配置文件位于 config/pvpoption.json,首次启动时会以默认值创建。每个值也可以通过 /pvp admin … 实时设置,并且 /pvp admin reload 无需重启即可重新读取文件。每个玩家的标志和锁定状态分别存储在 config/pvpoption/playerdata.json 中。
| 键 |
默认值 |
作用 |
pvpEnabled |
true |
整个系统的总开关(也会同步 server.properties 中的 pvp= 设置)。 |
disableRepairInPvP |
false |
当玩家被标记时,禁止 expRepair 的 XP 修复功能(需要 expRepair 1.7+)。 |
cooldownSeconds |
30 |
有效命中后的战斗冷却时间;在冷却结束前无法解除标记(设为 0 则禁用此功能)。 |
warmupSeconds |
5 |
执行 /pvp on 后实际标记玩家的等待倒计时(设为 0 则立即生效)。 |
broadcastToggle |
true |
当玩家进入或离开 PvP 模式时广播公告。 |
autoUnflagMinutes |
0 |
在此空闲分钟数后自动移除标记(设为 0 则永不自动移除)。 |
? 与 expRepair 兼容良好
如果安装了 expRepair (1.7+),pvpOption 会向其注册一个修复抑制钩子。启用 disableRepairInPvP 后,当前被标记为 PvP 状态的玩家其 XP 修复功能将被抑制——这样你就无法在决斗中途用经验值修补装备耐久度。该钩子仅在 expRepair 实际存在时才接入;如果没有安装 expRepair,disableRepair 管理命令将提示未检测到 expRepair。
? 兼容性
|
|
| 加载器 |
Fabric 和 NeoForge —— 同一个 jar 包 |
| Minecraft |
26.1 – 26.3 —— 单个 jar 包,v1.5.5 · 1.21.11 和 1.21.1 – 1.21.10 —— v1.5.3 |
| Fabric API |
Fabric 端必需 · NeoForge 端不需要 |
| 运行环境 |
服务端 —— 支持原版客户端,也支持单人游戏 |
| 额外依赖库 |
无 |
喜欢它吗?加入 Discord · ⭐ 仓库 · 探索 Lunixia 的其他 Minecraft QOL 模组
⛏️ 小巧专注的模组,剔除繁琐操作。
⚔️ pvpOption
Consensual, opt-in PvP
On most servers PvP is a single switch: on for everyone, or off for everyone. pvpOption replaces it with a per-player, opt-in flag. You deal and take player-versus-player damage only when you've chosen to — and only against other players who've chosen to as well. Everyone else stays fully protected. No more accidental hits, no more "I didn't mean to swing at them," no more getting ganked when you just wanted to build.
? New in 1.5.5: one jar now runs on every Minecraft 26.x release — 26.1, 26.1.1, 26.1.2, 26.2 and 26.3.
✨ Features
- ⚔️ Opt in with one command.
/pvp flips your flag on. A short warmup counts down first — a grace period so nobody instantly ambushes you — then your flag goes live.
- ? Both sides must agree. A hit only lands when attacker and defender are both flagged. Swing at an unflagged player and the blow is cancelled, with a message telling you why.
- ⏱️ A combat cooldown keeps fights honest. Every valid hit starts a combat timer on both players. You can't unflag and run to safety mid-fight — you're locked in until it expires.
- ? Optional auto-unflag. Admins can quietly drop a player's flag after a stretch of inactivity, so people who forget to
/pvp off don't wander around flagged forever.
- ? Live action-bar HUD. Your current state at a glance — warmup countdown, ⚔ PvP Active, and the remaining combat cooldown.
- ? Optional broadcasts. Announce server-wide when a player enters or leaves PvP mode, so everyone knows who's fair game.
- ?️ Full admin controls. Toggle the whole system, tune warmup / cooldown / auto-unflag live, force a player's flag on or off, and lock troublemakers out of PvP entirely.
- ? Persistent per-UUID state. Flags and admin locks survive restarts. No new blocks, no items, no client mod required.
⌨️ Commands
The root command is /pvpoption, with /pvp as a shorter alias. Running it bare toggles your own flag.
Player commands
| Command |
What it does |
/pvp |
Toggle your own PvP flag on or off. |
/pvp on |
Opt in — starts the warmup, then flags you. |
/pvp off |
Opt out — cancels a pending warmup, or unflags you (blocked while in combat cooldown). |
/pvp status |
Show your own flag state, plus any remaining combat cooldown. |
/pvp list |
List every player currently flagged for PvP (and who's in combat). |
Admin commands
All admin subcommands live under /pvp admin … and require operator / game-master permission (level 2+).
| Command |
What it does |
/pvp admin |
Show the current admin settings. |
/pvp admin enable | disable |
Turn the whole PvP system on or off server-wide. |
/pvp admin warmup [seconds] |
Show or set the opt-in warmup, in seconds (0 = instant). |
/pvp admin cooldown [seconds] |
Show or set the combat cooldown, in seconds (0 = disabled). |
/pvp admin autoUnflag [minutes] |
Show or set the idle auto-unflag time, in minutes (0 = disabled). |
/pvp admin broadcast on | off |
Toggle the "entered/left PvP mode" announcements. |
/pvp admin disableRepair on | off |
Toggle expRepair repair suppression for flagged players. |
/pvp admin reload [silent] |
Reload the config from disk (silent announces only to you). |
/pvp admin set <player> on | off |
Force a player's flag on or off. |
/pvp admin status <player> |
Inspect another player's flag, cooldown, and lock state. |
/pvp admin lock <player> |
Unflag a player and restrict them from opting into PvP. |
/pvp admin unlock <player> |
Lift a restriction and restore a player's PvP access. |
⚙️ Configuration
Config lives at config/pvpoption.json and is created with defaults on first launch. Every value is also settable live through /pvp admin …, and /pvp admin reload re-reads the file without a restart. Per-player flags and locks are stored separately in config/pvpoption/playerdata.json.
| Key |
Default |
What it does |
pvpEnabled |
true |
Master switch for the whole system (also syncs pvp= in server.properties). |
disableRepairInPvP |
false |
Suppress expRepair XP repair while a player is flagged (needs expRepair 1.7+). |
cooldownSeconds |
30 |
Combat cooldown after a valid hit; you can't unflag until it expires (0 = disabled). |
warmupSeconds |
5 |
Grace-period countdown before /pvp on actually flags you (0 = instant). |
broadcastToggle |
true |
Announce when a player enters or leaves PvP mode. |
autoUnflagMinutes |
0 |
Auto-drop a flag after this many idle minutes (0 = never). |
? Plays nice with expRepair
If expRepair (1.7+) is installed, pvpOption registers a repair-suppression hook with it. With disableRepairInPvP on, any player currently flagged for PvP has their XP repair suppressed — so you can't top off gear durability in the middle of a duel. The hook only wires up when expRepair is actually present; without it, the disableRepair admin command simply reports that expRepair isn't installed.
? Compatibility
|
|
| Loaders |
Fabric and NeoForge — one jar |
| Minecraft |
26.1 – 26.3 — one jar, v1.5.5 · 1.21.11 and 1.21.1 – 1.21.10 — v1.5.3 |
| Fabric API |
Required on Fabric · not needed on NeoForge |
| Side |
Server-side — vanilla clients supported, single-player too |
| Extra libraries |
None |
Enjoying it? Hop in the Discord · ⭐ the repo · explore the rest of Lunixia's Minecraft QOL Mods
⛏️ Small, focused mods that cut out the boring stuff.
评论 0
登录后参与评分
还没有评论,来抢沙发吧