Home›Java›Mods›Pvp
Pvp
ModsJava

Pvp

Java mod listed for Minecraft 1.20–1.21. Downloads from the MC Java Mods app on Android.

by CreeperTron123 · on Modrinth

⬇ Download on Modrinth

PvP 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


⚔️ 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:

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:

3. Staff Bypass (pvp.pvpall)

Any player holding the permission pvp.pvpall (granted to server operators by default) bypasses all restrictions:

4. World Filtering

You can selectively enforce PvP protection only in designated worlds via protected-worlds in config.yml:

5. Session State


🎮 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:


Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more