Перейти к содержимому
Mineforgian

oPvP-Toggle

oPvP-Toggle is a lightweight PvP management plugin that allows players to disable PvP combat for added safety. It also includes mob protection, preventing hostile mobs from targeting or damaging protected players.

Загрузки
14
Подписчики
0
Обновлён
4 июня 2026 г.
Лицензия
MIT

Опубликован 4 июня 2026 г.

oPvP-Toggle

Lightweight per-player PvP toggle for Paper 1.21.x / 26.1.x. No combat tagging — only answers "can these two players damage each other right now?" Pairs with any combat tag plugin like DeluxeCombat or CombatLogX.


Features

  • Per-player toggle — each player independently enables/disables PvP via /pvp
  • Toggle cooldown — configurable delay between toggles (default: 5s), bypassable with permission
  • Warmup system — delayed toggle effect with cancel-on-damage (optional, default: instant)
  • Mob & environment protection — when PvP is OFF, mobs, fall, fire, etc. are also blocked (configurable)
  • World overrides — force PvP ON or OFF in specific worlds (arenas, resource worlds, etc.)
  • WorldGuard region integration — per-region PvP rules (ALLOW / DENY / FORCE_ON / FORCE_OFF / INHERIT) via reflection (no compile dependency)
  • State persistence — saves player states to disk (data/pvp-state.bin) across restarts
  • Reset on death — optionally reset PvP state when a player dies
  • Fully configurable messages — every message string, color, and placeholder is customizable
  • Reload/opvp reload to apply config changes without restart

Commands

Command Aliases Description Permission
/opvp toggle [player] t, switch Toggle your own (or another's) PvP state opvp.command.toggle (+ opvp.admin for others)
/opvp status [player] s, check Check PvP state opvp.command.status
/opvp help ? Show help menu opvp.command.help
/opvp reload rl Reload plugin config opvp.command.reload

Shortcuts: /pvp and /pvptoggle are aliases for /opvp toggle.


Permissions

Permission Description Default
opvp.use Basic access to /opvp true
opvp.command.toggle Use /opvp toggle true
opvp.command.status Use /opvp status true
opvp.command.help Use /opvp help true
opvp.command.reload Reload plugin config op
opvp.admin Toggle other players' PvP state op
opvp.bypass.cooldown Skip toggle cooldown op
opvp.bypass.region Bypass WorldGuard region rules op

Configuration

Core (config.yml)

toggle-cooldown: 5           # Seconds between toggles
reset-on-death: false         # Reset PvP state on death
persist-state: true           # Save states to disk
mob-protection: true          # Block mob/environment damage when PvP OFF

toggle-warmup: 0              # Seconds before toggle takes effect (0 = instant)
cancel-warmup-on-damage: true # Cancel warmup on damage taken/dealt

force-enabled-worlds: []      # Worlds where PvP is always ON
force-disabled-worlds: []     # Worlds where PvP is always OFF

WorldGuard Region Rules

regions:
  enabled: false
  default-pvp: INHERIT
  rules: []

Rule values: ALLOW | DENY | FORCE_ON | FORCE_OFF | INHERIT

Messages

All 20+ messages are fully customizable with &-color codes and placeholders (%player%, %attacker%, %target%, %state%, %seconds%).


Installation

  1. Place the JAR in your server's plugins/ folder.
  2. Restart the server (or run /reload).
  3. Optionally install WorldGuard for region-based rules.
  4. Edit plugins/oPvP-Toggle/config.yml to your liking.
  5. Run /opvp reload to apply changes.

Requirements:

  • Paper 1.21.4+ (or Paper 26.1.x / Folia fork)
  • Java 21

Design Philosophy

oPvP-Toggle is intentionally small and focused. It does one thing — decide whether two players can PvP — and does it well. Combat tagging (preventing toggling during combat) is left to dedicated plugins. This keeps the codebase lean (~880 lines), predictable, and compatible with any combat tag system you choose.


Support

Report issues or get support on Discord: 334ms.exe

Комментарии

Загружаем…