0

I have tried and tried but I can't find any solution that fits 1.13. Is there anyway possible to detect when a player respawns. My goal is to remove all the effects on a player when they respawns. But I'm just too bad. I have tried some commands from videos but they are just to outdated

I have tried THIS Video and it uses an old trick so it was no use. I tried to find a player respawn scoreboard with no luck. And finally I tried this:

(In a repeating command block, always acitve)

/execute as @a[scores={M_Death=1}] run effect clear @a[scores={M_Death=1}]

(In a chain command block, condential, always active)

/scoreboard players reset @a[scores={M_Death=1}] M_Death

Any idea anyone?

  • If you've made some attempts, it's a good idea to show us what you've tried. Otherwise, answerers don't know that, and might be repeating what you've already done. – Frank Jul 25 '18 at 14:51
2

Assuming you have a scoreboard that tracks deaths, you only need to find players that are alive and have a score of 1 or more on that scoreboard. The @a target selector targets all players, regardless of whether they are alive or dead. The @e[type=player] target selector only targets alive players. This is the result:

/effect clear @e[type=player,scores={deaths=1..}]
/scoreboard players reset @e[type=player,scores={deaths=1..}] deaths

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.