跳到正文

pvpOption

作者:lunixialive

Opt-in PvP for servers. Only flagged players can fight each other. Includes warmup timer, combat cooldown, action bar HUD, auto-unflag on inactivity, broadcast messages, and full admin controls. Optional expRepair compatibility.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

⚔️ pvpOption

Consensual, opt-in PvP

Fabric NeoForge

Download on CurseForge Discord GitHub

Minecraft 26.x & 1.21.x Single Player & Server Fabric API required on Fabric MIT License


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.

常见问题

pvpOption 支持哪些 Minecraft 版本?

pvpOption 支持 Minecraft Java 版 1.21–26.3,共 17 个版本,可用的加载器:Bukkit / Fabric / NeoForge / Paper / Purpur / Spigot。下载时注意选择和你游戏版本一致的文件。

pvpOption 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Bukkit / Fabric / NeoForge / Paper / Purpur / Spigot,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。

评论

登录后评论和评分

lunixialive 的其他作品

查看全部 →