Disable PVP in Minecraft with a command



  • Is there any way to disable PVP in Minecraft Java edition with a command, if I already have teams created that are needed?

    Things I've Considered/Tried

    • Creating a team named all, giving it to everyone and turning off friendlyFire. This does not work for me because I already have teams that I use.
    • Changing the server properties. This does not work for me because I need to be able to change it from in-game. This is for a minigame I am making.

    Thank you in advance!



  • You can use the weakness effect which when having a high strength does not allow the player to deal any damage. /effect give @a weakness 9999 255 true will give weakness 255 to all players until you clear it and also hide the bubbles to make sure they don't annoy anyone.

    Note for Bedrock Edition players:

    There is a gamerule command /gamerule pvp false which will disable PVP.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2