# Can I make players have constantly full health?

In a map I'm building, I want players to always have full health, no matter what damages them, as long as it doesn't kill them. That is, when they get 19.5 hearts worth of damage, their health will instantly refill, but when they get 20 hearts damage at once, they die. I already tried doing

``````/effect @p minecraft:regeneration 100000 255
``````

This only regenerates the health fast, not instantly. How can I do this?

Never thought it could be so easy, just do this:

``````/effect @p minecraft:instant_health 100000 1
``````

This will give you instant health regeneration for 100000 seconds (only for 27 hours and 46 minutes) - it will give you instant health as a potion effect until you drink milk or die. You heal instantly, without even seeing the health go down. A clock can be used to re-apply the effect.

• I believe you need to have this on a redstone clock (or one of the new 1.9 command blocks) Commented Sep 12, 2016 at 2:59
• Wouldn't a clock be useful to (re)apply the effects?
– dly
Commented Sep 12, 2016 at 7:21
• @dly Yes, but it would have to be a clock that can be turned off mosrt probably. Commented Sep 12, 2016 at 8:07
• "for unlimited time" - This statement is incorrect. Potion effects cannot last forever without a clock. The display in the inventory shows `**:**` when the duration in ticks is greater than 32,767. It simply means it's too large to convert for display and does not mean it lasts forever. The effect will dissipate after the specified 100,000 seconds if not re-applied sooner. Commented Sep 12, 2016 at 9:19
• You can go up to 1 million ticks with that I believe (or 2^31-1 in NBT tags, if they take the complete range of `Integer` numbers). The display goes as far as `Short` numbers go (2^15-1 or 32767). Can we say infinite, if the effect lasts for 3 years (2^31-1 ticks = 3.4 years)?
– dly
Commented Sep 13, 2016 at 6:16