PT-BR EN ES
Channel Icon

Crazy Ozz

Official Channel Website

Command Block

How to Disable PVP in Minecraft Using Commands

Minecraft Java Edition 1.21+ and 26+ (Team + Friendly Fire)

In this tutorial, you will learn how to disable PVP in Minecraft Java Edition 1.21+ and 26+ using team commands and the friendlyfire setting. This method is perfect for servers, lobbies, minigames, and custom maps where you want to prevent players from damaging each other.

Start by creating a team with the following command

team add NoPVP

Disable friendly fire for the created team with this command

team modify NoPVP friendlyfire false

Now make all players join the team using this command

team join NoPVP @a

Now test it with another player, because this command does not work with mobs

Want cheap and lag-free Minecraft hosting?

I recommend Sparked Host: affordable plans, great performance, easy panel and fast support.

🚀 Start your Minecraft Server

Still have questions? Watch the video below