To turn off PvP on a Minecraft server running Java 1.21.9 or newer, type gamerule pvp false in the server console. On 1.21.8 and older, set pvp=false in server.properties and restart. Either way, players stop doing damage to each other, while mobs, fall damage and lava still hurt. This guide covers both versions, Paper worlds, PvP only at spawn and safe teams.
Which method fits your version?
Mojang moved PvP from server.properties to a game rule in snapshot 25w35a, part of Java 1.21.9. According to the Minecraft Wiki, the pvp property was removed from server.properties at that point and the pvp game rule took its place, with true as the default.
| Server version | How to turn PvP off | Restart needed? |
|---|---|---|
| Java 1.21.9 and newer (26.x) | gamerule pvp false | No |
| Java 1.21.8 and older | pvp=false in server.properties | Yes |
| Bedrock Dedicated Server | gamerule pvp false | No |
Not sure which version you run? The first lines of the console log at startup show it, and version in the console prints it on Paper and Spigot.
Turn off PvP on a Minecraft server with the game rule
- Open your server in the panel and click Console.
- Type
gamerule pvp falseand press Enter. No slash is needed in the console. - Check the reply: it confirms the game rule is now set to false.
- Type
gamerule pvpwith no value to read the current setting at any time. - If you run Paper, Purpur or Spigot, repeat it for the other worlds (see below).
gamerule pvp false
gamerule pvp
The game rule is saved with the world, so it stays off after a restart. To turn PvP back on, type gamerule pvp true. In game, an operator can run the same command in chat with a slash: /gamerule pvp false.
Paper and Spigot: each world has its own rules
On Paper, Purpur and Spigot, the Overworld, Nether and End are separate worlds, and each keeps its own game rules. A command from the console applies to the main world. To cover the other two, run it inside each dimension:
gamerule pvp false
execute in minecraft:the_nether run gamerule pvp false
execute in minecraft:the_end run gamerule pvp false
Skip this and players will find that fights still work in the Nether.
Turn off PvP in server.properties (1.21.8 and older)
- Take a quick copy in Backups if you are about to change several settings.
- Open Files and click
server.properties. - Find
pvp=trueand change it topvp=false. - Save the file and restart the server from the panel.
pvp=false
If you later update the server to 1.21.9 or newer, check the result with gamerule pvp after the update, because the old line no longer controls PvP. Our guide on how to update a Minecraft server covers the update itself.
PvP off only at spawn, or only between teammates
Sometimes you want fights in the wild but a safe spawn, or friends who cannot hit each other by accident.
Safe teams with vanilla commands. A team with friendly fire off stops its members from hurting each other, while they can still fight other players:
team add friends
team modify friends friendlyFire false
team join friends Steve
team join friends Alex
A safe spawn with a protection plugin. On Paper, a region plugin such as WorldGuard can deny PvP in one area. After you install it from the Plugins tab and select the area with its wand, /rg define spawn creates the region and /rg flag spawn pvp deny blocks fights inside. To turn PvP off everywhere with the plugin instead, use /rg flag __global__ pvp deny.
Spawn protection is a different thing: spawn-protection stops non-OPs from breaking blocks near spawn, but it does not stop PvP. See Minecraft spawn protection radius for that setting.
PvP still on? Common causes
- You edited
server.propertieson 1.21.9 or newer. The line does nothing there. Usegamerule pvp false. - You set the rule in only one world. On Paper, repeat it for the Nether and End.
- A plugin turns it on. Combat, minigame or faction plugins can enable PvP in their own areas or modes. Check their configs.
- Damage still happens from traps. The rule stops players attacking players. Lava, fall traps and mobs keep doing damage.
- You edited the file but did not restart. On older versions the server reads
server.propertiesonly at startup.
If you also want items kept after death on a peaceful server, see keep inventory on a Minecraft server.
A peaceful server that is always online
On TheGameHosting the whole change is one line in Console. Files handles server.properties on older versions, Plugins installs region plugins, and Backups saves the world before you try something new. The server runs 24/7 in Dallas or Amsterdam on AMD 9950X or 7950X3D CPUs with NVMe storage, so your friends can play when your PC is off, and DDoS protection is included on every plan.
Java plans start at 2 GB for $1.90 USD per month with no charge per player. See every size on Pricing or read more about our Minecraft server hosting.
FAQ
How do I turn off PvP on my Minecraft server?
On Java 1.21.9 or newer, run gamerule pvp false in the console. On older versions, set pvp=false in server.properties and restart the server.
Why is there no pvp line in my server.properties?
Since Java 1.21.9 PvP is controlled by the pvp game rule, and the property was removed. Use gamerule pvp false instead.
Can I turn off PvP only at spawn?
Not with vanilla settings alone. A region plugin like WorldGuard can deny PvP inside a spawn region while the rest of the world keeps it on.
How do I stop friends from hurting each other but keep PvP on?
Put them on a team with team modify friends friendlyFire false. Teammates cannot damage each other, but they can still fight other players.
Hosting for this game
Written by TheGameHosting Team, the people who run our servers in Dallas and Amsterdam and answer your tickets.
All posts
TheGameHosting Team
