If you’re tired of accidentally killing your buddy while fighting enemies in close quarters, or your kids are screaming because one of them 8-bit-murdered the other again, this is the tutorial for you. Read on as we show you how to disable player vs. player damage in Minecraft once and for all.
Why You Would Want To Do This
If fighting your friends in Lord-of-the-Flies-style island combat is the whole reason you enjoy playing Minecraft, than this certainly isn’t the tutorial for you. If, however, you’re one of the many people who are annoyed by how easy it is to slash your buddies with your sword instead of the zombies that are attacking your base, you’ll find this useful.
RELATED: The Parents’ Guide to Minecraft
Further, if you’re one of the many parents who are sick of the drama when one of your kids accidentally (or purposely) kills another one of your kids during a rowdy Minecraft adventure, this is definitely the tutorial for you. (If you’re one of those parents, by the way, and you want to learn more about the game your kids are obsessed with, we’ve got you covered.)
Let’s put an end to friendly fire and help keep the peace in both your block worlds and your homes by turning off PVP damage in Minecraft. We’re going to look at two techniques for disabling PVP. The first is a simple toggle that has been available to people running Minecraft servers for ages; if you’re running a Minecraft server at home we suggest you use the first method. The second is for players who don’t run a local server but instead use the “open to LAN” feature to share their game with people on their local network.
Either way, when you’re done, you’ll no longer need to worry about accidentally hacking up your friends or your kids fighting over PVP damage.
How to Disable PVP Damage on a Server
If you haven’t jumped into the world of running your own Minecraft server, and instead share your game with friends by opening your Minecraft game to the LAN, this section of the tutorial is for you.
Despite the fact that fans have been clamoring for a simple way to turn of PVP in a local LAN game for years, there is no simple toggle in the settings menu (like there is for, say, changing the game difficulty level). Nonetheless, there is a really clever way to hijack a feature in the game you’re likely not even using to accomplish exactly what you want: disabling PVP. This trick is a little more involved than the simple “pvp=false” toggle available to server users, but we think you’ll appreciate how clever it is.
For years Minecraft has had a “scoreboard” feature built in. This function is used almost entirely by minigame makers and it’s quite possible you’ve been playing Minecraft since the beginning without ever seeing it. This scoreboard feature has two functions built in that we can use in order to turn PVP damage off in our game: the team flag and the friendly fire flag. By grouping all the players on our local game into a single team and then turning the friendly fire flag to off, we create a game-wide team where no team member can accidentally hurt another team member.
Start up your LAN game and press “T” to open up the in-game console. Here are the exact commands you need to use, paired with an explanation of what you’re accomplishing with them. Any text in brackets is a variable you should change to fit your situation.
/scoreboard teams add [teamname]
This command creates a team. The name of the team is irrelevant for our purposes (but it’s name must be 16 characters or less). If you’re at loss for a good team name “minecraft” fits the bill nicely.
After creating your team, add yourself to the team by entering the below command, replacing
[teamname] with the team you created and
[player] with your Minecraft username.:
/scoreboard teams join [teamname] [player]
Repeat this process for all the other players. The players do not need to be online when you use this command, but you do need to know their usernames.
/scoreboard teams option [teamname] friendlyfire false
This final command toggles the setting for the team so that friendly fire is not enabled. At this point no members of the team can accidentally hit other members of the team and deal PVP damage.
You will need to use the join command to add each new player that joins your local game, or else the player that is not on the collective team will not be immune to PVP damage (and will still be able to deal PVP damage).
While this method has a few more steps than the simple “pvp=false” toggle we saw in the previous server-centered section, it does have one advantage: you can turn the PVP setting off and on without restarting the server/game. If you and your friends decide that a little friendly brawl is in order, you can easily flip the “friendlyfire” flag back to “true”, enjoy some PVP, and then turn it back to “false”.
With a little tweak, all can be well in your Minecraft universe: no more accidentally killing your friend while you’re fighting the Ender Dragon and no more listening to your kids scream at each other when one of them takes a pixelated ax to the dome and loses all their experience levels.