make player inable to deal damage to someone minecraft

make player inable to deal damage to someone minecraft - Old fashioned cassette player placed in shabby garage near old industrial equipment

I made a mechanism where if you get hit, you get hit by lightning. However all the redstone freezes and stays on if you spam it. Because it test if you have stat.damageTaken and if it is 1 or higher it executes lightning at all players with score of one or higher. However I can't do /scoreboard players reset @a isHit fast enough because I need a delay for the lightning going away. However during the delay, a player can hit the other player again and spam it freezing the redstone. Is there away to make it reset instantly or make the player unable to hit for a few ticks? I prefer the 2nd one becuase it makes it less OP for a custom PVP map I am making



Best Answer

I think editing your redstone is ultimately a better solution, however if you do want to stop a player from being able to do damage, I believe using a high level Weakness status effect actually yields 0 damage:

/effect @p 18 3 255 true

This should render the targeted player unable to do damage for 3 seconds (Change the 3 to any number of seconds as required) The true at the end also hides the particle effects, so it shouldn't be too noticeable to the player.

Structure of command:

/effect <player> <effect> [seconds] [amplifier] [hideParticles]



Pictures about "make player inable to deal damage to someone minecraft"

make player inable to deal damage to someone minecraft - Man in White Nike Crew Neck T-shirt Holding Black and Red Tennis Racket
make player inable to deal damage to someone minecraft - Free stock photo of action energy, active, athlete
make player inable to deal damage to someone minecraft - Man in Black Long Sleeve Shirt Holding Basketball



How do you turn off player damage in Minecraft?

How to Disable Player Fire Damage on your Minecraft Server
  • Head over to your server Console or enter into your Minecraft Server.
  • Enter the command /gamerule fireDamage false (ensuring to keep the upper case letters). This'll disable Fire Damage. ...
  • That's it!




  • How to Deal Custom Damage Amounts to Players in Minecraft




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Andrea Piacquadio, Centre for Ageing Better, sagar sintan, Truman Rexti