Is there a way to keep potion effects when you die?
 
		
		
						Is there a way for a specific player to keep the potion effect when he dies? For example, my friend and i are playing, with both a different potion effect. But when i die, i have to get that potion effect back, and my friend not.
A fast clock that constantly checks if a player is dead, and if so gives that player the potion effect, wouldn't work because then my friend would also get the same potion effect as I do.
Best Answer
The simplest way you can do this is have a fast clock, but don't check if there is a player that has died. Instead, just put your Minecraft username there and it will keep giving you the potion effect even after you die. E.g. (gives jump boost 2 to player with name 'username'):
/effect username minecraft:jump_boost 99999 2
Alternatively, if you want this to work with any two people, have a scoreboard objective and set it to 1 for the player to receive the potion effect. Then give the player with a score of 1 for that objective the potion effect with a really fast clock.
/effect @a[score_effect_min=1] minecraft:jump_boost 99999 2
Hope this helped you!
Pictures about "Is there a way to keep potion effects when you die?"



How do you keep your effects when you die in Minecraft?
How do you make a potion effect last forever?
You could just replace the time amount with something over 9999. This will give an infinite potion effect until the player dies. That way you wouldn't have to use a constant redstone clock, which, depending on how powerful someone's computer is, can lag their game.How do you get permanent effects in Minecraft?
If the player dies while under the effects of a God Potion without having a Booster Cookie active, they will lose all their God Potion effects.Keeping Potion effects after death
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: NastyaSensei, Marian Andrukhiv, Plato Terentev, Pixabay
