How to turn off PvP in Minecraft
Run /gamerule pvp false and players can no longer damage each other. Set it back to true to allow PvP again.
pvp
Controls whether players can damage each other.
/gamerule pvp <true|false> Examples
/gamerule pvp false Turn off player versus player combat.
Values
| Value | What it does |
|---|---|
| trueDefault | On |
| false | Off |
Arguments
true|falseOptionaltrueturns the rule on,falseturns it off. Leave it out to show the current value.
What it does
Set it to false for peaceful SMP, building and creative servers where players should not be able to hurt one another. Mobs still damage players.
Good to know
- Replaces the old
pvpline in server.properties. - Takes effect immediately.
Run it on your server
On a SLASHPLAY server, type it in the Console tab without the leading slash; in game, operators type it in chat with the slash. New to this? Start a Minecraft server first.
Your own
Minecraft server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.