Is there any minecraft command to become completely immune to damage?

2 Answers 2


This command will make you invulnerable to most types of damage for 277 hours:

/effect give PlayerName minecraft:resistance 1000000 255

Additionally, you can become immune to hunger with this:

/effect give PlayerName minecraft:saturation 1000000 255

Not strictly related, but this command will allow you to defeat the ender dragon in one hit:

/effect give PlayerName minecraft:strength 1000000 255

Try playing in Creative Mode

There is also the cheat:

/gamerule falldamage false

in Survival mode

  • Downvoter, did you try these 2 answers before downvoting?
    – bobobobo
    Commented Jul 4, 2023 at 18:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .