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.


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!

|improve this answer|||||
  • yeah, i've done something that looks like that. I've made a scoreboard for everyplayer, instead of every effect, because i have some other things that needs to be player related ;) – Wilmz Jan 19 '15 at 15:11
  • @Wilmz That's good, feel free to mark as accepted! – SchoolBoy Jan 20 '15 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.