
Pvp
Java mod listed for Minecraft 1.20–1.21. Downloads from the MC Java Mods app on Android.
⬇ Download on ModrinthPvP Toggle Plugin
A lightweight, high-performance opt-in PvP management plugin for Minecraft servers running Paper, Purpur, or Spigot (1.20.4+).
📖 Overview
By default in vanilla Minecraft, any player can attack another player if server-wide PvP is enabled. This plugin introduces an opt-in PvP system: players choose for themselves whether they want to engage in combat or remain peaceful.
All feedback messages are delivered via the Action Bar (above the player's hotbar) rather than the chat window, keeping chat clean and unspammed during intense gameplay.
✨ Key Features
- Mutual Consent PvP: Both the attacker and the defender must explicitly enable PvP to fight each other.
- Projectile Damage Protection: Automatically resolves shooters of ranged projectiles (arrows, tridents, etc.) to prevent circumvention of the PvP rule.
- Non-Intrusive Action Bar Notifications: Instant feedback without cluttering player chat.
- Admin / Moderator Bypass: Specific permission (
pvp.pvpall) allows authorized staff to strike players regardless of toggle status. - Multi-World Support: Configure protection server-wide or limit it to specific worlds (e.g., survival world protected, minigame/anarchy worlds unrestricted).
- Configurable Default State: Choose whether new or joining players start with PvP turned ON or OFF.
- Lightweight & High Performance: Minimal memory footprint; uses in-memory
UUIDsets and efficient Paper event hooks (HIGHpriority,ignoreCancelled = true).
⚔️ How It Works (Detailed Mechanics)
1. The Two-Way Consent Rule
For damage between two players to be registered, both players must have their PvP mode toggled on:
- Attacker (ON) vs Defender (ON): Damage is allowed. Combat proceeds normally.
- Attacker (ON) vs Defender (OFF): Damage is blocked. The attacker sees an Action Bar warning (
messages.denied). - Attacker (OFF) vs Defender (ON): Damage is blocked. The attacker cannot deal damage while having their own PvP turned off (
messages.denied). - Attacker (OFF) vs Defender (OFF): Damage is blocked (
messages.denied).
2. Projectile Protection
When protect-projectiles is enabled (true), the plugin intercepts damage from ranged weapons (such as bow/crossbow arrows, tridents, snowballs, etc.). It verifies the shooter entity:
- If the shooter is a player, the same two-way PvP consent check is applied.
- If either party has PvP disabled, the hit is cancelled and no damage or knockback is applied.
3. Staff Bypass (pvp.pvpall)
Any player holding the permission pvp.pvpall (granted to server operators by default) bypasses all restrictions:
- They can damage any player at any time, even if they or the target have PvP disabled.
- This is ideal for moderators, admins, or custom bounty hunter roles.
4. World Filtering
You can selectively enforce PvP protection only in designated worlds via protected-worlds in config.yml:
- If
protected-worlds: [](empty list): Protection is active across all worlds. - If
protected-worlds: ["world", "world_nether"]: Protection is strictly enforced inworldandworld_nether. In any unlisted world (e.g.,pvp_arena), standard vanilla PvP rules apply unrestricted.
5. Session State
- Player PvP states are kept in memory by
UUID. - On joining the server, the player's initial state is initialized according to
default-pvpinconfig.yml. - On quitting, their entry is cleaned up to prevent memory leaks.
🎮 Commands
| Command | Permission | Description |
|---|---|---|
/pvp |
pvp.toggle |
Toggles your personal PvP status (Enabled ↔ Disabled). |
Note: The command is player-only. Attempting to run /pvp from the server console safely does nothing.
🔐 Permissions
| Permission | Default | Description |
|---|---|---|
pvp.toggle |
true (all players) |
Grants permission to use the /pvp command to switch combat modes. |
pvp.pvpall |
op (administrators) |
Allows attacking any player regardless of their PvP toggle mode. |
⚙️ Configuration (config.yml)
The configuration file is automatically generated at plugins/Pvp/config.yml on first run:
# Whether PvP protection is enabled in a world.
# An empty list ([]) means protection applies to all worlds on the server.
# Example: protected-worlds: ["world", "world_nether"]
protected-worlds: []
# Initial PvP mode for players when they join the server.
# Set to false so players join with PvP disabled by default.
default-pvp: false
# Whether to protect against attacks made with projectiles (arrows, tridents, snowballs, etc.).
protect-projectiles: true
# Messages sent to players (displayed in the Action Bar, supports '&' color codes).
messages:
enabled: '&aPvP enabled. You can now fight other players.'
disabled: '&ePvP disabled.'
denied: '&cThe other player has PvP disabled.'
no-permission: '&cYou do not have permission to use this command.'
Options Explanation:
protected-worlds: A YAML string list. Specify the names of the worlds where protection should run. Leave empty[]to protect everywhere.default-pvp: Set tofalse(recommended for peaceful/SMP servers) so players join safe. Set totrueif you prefer players opting out of combat.protect-projectiles: Set totrueto stop arrow and trident attacks between non-consenting players. Set tofalseif you only want to regulate direct melee strikes.messages: Customizable text strings supporting standard Minecraft&color formatting (e.g.,&a= green,&e= yellow,&c= red).
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.20.6, 1.20.5, 1.20.4
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Modrinth — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
- Ships as pvp-1.0.jar — drop this file into the mods folder
- Download size: 4 KB
- Download link checked 13 Nov 2026 — working
These come from our own check of the pack file, not from the source page.