PvP Toggle

PvP Toggle

Combat flagging and persistent PvP preferences to pet protection and more!

by
25.1K Downloads
fabricgame-mechanicsmanagementutility
Rent Server with this Mod

Screenshots

PvP Toggle Screenshot 1
PvP Toggle Screenshot 2
PvP Toggle Screenshot 3
PvP Toggle Screenshot 4

About this Mod

Title

fabric
modrinth
curseforge

A mod that lets players toggle PvP individually, while offering some neat extra features that I reckon you may find useful. I am also aware that quite a few mods do something similar, but I felt like I could make something beyond a simple toggle.

Features this mod offers

  • PvP preferences: Players choose whether to disable or enable PvP for themselves, which is persistent on server restart (things like combat flags, cooldowns, and the global PvP state are not).
  • Colored name tags: Uses vanilla's teams to show off players' PvP states.
  • Combat flagging: Works by temporarily disabling toggling upon engaging in PvP. Players who are flagged will be immediately killed when attempting to log off while they have an active combat flag. It does not account for how the player got disconnected (say, by losing connection) to avoid potential workarounds.
  • Global PvP: Force PvP on or off for all players server-wide; this takes priority over everything else.
  • Pet protect: Protect all tamed mobs from players whose PvP is off. Attackers are flagged upon damaging a tame (the pet owner’s PvP state is not factored in). Feel free to turn this off if you'd rather use a dedicated mod to handle this.
  • Forced PvP in other dimensions: Forced PvP in any dimension that isn't the Overworld.
  • LuckPerms support: Allows you to customize accessibility to things.
  • Configurability: Some stuff can be configured; for info on what is configurable, go down to the configuration section.

Disclaimer

This mod ignores the pvp setting in server.properties. Stick to the newest versions of the mod, as older versions may have bugs or lack features as my work is not perfect. Make sure to look at the dependencies section as well.

Dependencies

  • Fabric API
  • LuckPerms (This is entirely optional if you don't care about customizing permissions).

Commands & Permissions

Spoiler
Command Explanation Permission Node
/pvp Toggles your PvP on or off. pvptoggle.player.toggle
/pvp <player> Change a player's PvP preference. pvptoggle.op.other.toggle
/pvp <player> timeout <duration> Prevent a player from toggling for a specified duration (in seconds). pvptoggle.op.other.timeout
/pvp status Displays your current PvP status. pvptoggle.player.status
/pvp status <player> View a detailed info list about a player's PvP state. pvptoggle.op.other.status
/pvp status flag Toggle displaying your PvP flag timer on or off. pvptoggle.player.status
/pvp global <state> <shouldBroadcast> Set the global PvP state to on, off, or neutral. The <shouldBroadcast> argument (true or false) is for whether to announce it or not. pvptoggle.op.global
/pvp reload Reloads the configuration file. pvptoggle.op.reload

There's also the pvptoggle.op.exempt permission node that marks you as immune against penalties such as being flagged, being put on cooldown, etc.

Once again, as was said in the dependencies section, you can completely ignore permission nodes if you do not care for customizing them via another mod like LuckPerms.
All nodes labeled as "player" are available to everyone by default, while ones labeled as "op" are available to anyone with an operator permission level of 2 or higher.

Configuration

Spoiler

Configuration file path: config/pvptoggle/pvp-toggle.json (Generated on launch).

{
  // WARNING: DO NOT COPY THIS EXAMPLE JSON
  
  // Cooldown for toggling
  "toggle_cooldown": 120.0,

  // How long one is flagged for after engaging in combat
  "combat_flag_duration": 60.0,

  // Default PvP preference for new players
  "default_pvp_preference": true,

  // Console feedback
  "broadcast_to_other_ops": false,

  // I reckon the rest is self-explanatory
  "punish_combat_log": true,
  "protect_tameables": true,
  "force_pvp_in_other_dimensions": false,
  "team_colors": true
}

Every setting is a boolean value (true/false) besides toggle_cooldown and combat_flag_duration, which are floats that start from 0.0 to a maximum of 9999.0 seconds.

Edit the values and restart the server or use /pvp reload to apply said changes. Delete the JSON file if it ever becomes malformed to let it regenerate.

Support

Thank you for downloading. I would really appreciate it if you could report any potential issues you encounter in the comments section of the CurseForge mod page, as I currently have no other way to receive feedback.
You can also support me by sharing the mod around, as it really motivates me to work on it when there are people benefiting from its usage, no matter how small.

Available Versions

PvP Toggle 1.5.0+26.1release
MC 26.1, 26.1.1, 26.1.2fabric
April 12, 2026
PvP Toggle 1.4.0+1.21.11release
MC 1.21.11fabric
December 10, 2025
PvP Toggle 1.4.0+1.21.10release
MC 1.21.10fabric
October 9, 2025
PvP Toggle 1.4.0+1.21.9release
MC 1.21.9fabric
October 1, 2025
PvP Toggle 1.4.0+1.20.4release
MC 1.20.4fabric
August 27, 2025

How to Install PvP Toggle on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (26.1.2).

3

Install Mod

Open the mod browser in the dashboard and search for "PvP Toggle". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

26.1.2, 26.1.1, 26.1 (+12 more)

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

PvP Toggle server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (26.1.2). You can switch loaders with one click in the panel.

Is PvP Toggle compatible with fabric?

PvP Toggle officially supports fabric for Minecraft 26.1.2, 26.1.1, 26.1. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with PvP Toggle – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if PvP Toggle consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install PvP Toggle with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
LicenseRef-All-Rights-Reserved
Server-side
Required

Supported Versions

26.1.226.1.126.11.21.111.21.101.21.91.21.81.21.71.21.61.21.5+5 more