command block help
so i need help with commands to make a death detection system.
i have keep inventory on so there is no punishment for dying so i want to make is so you lose 10 levels is you die.
i have keep inventory on so there is no punishment for dying so i want to make is so you lose 10 levels is you die.
Commentaires
*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/Minecraft) if you have any questions or concerns.*
* Downvote this comment if this post is poor quality or does not fit the purpose of r/Minecraft
* Downvote this comment *and report the post* if it breaks the [rules](https://www.reddit.com/r/Minecraft/wiki/rules)
----
(*Vote has already ended*)
The scoreboard stuff is [here](https://www.reddit.com/r/Minecraft/comments/100bxo4/a_datapack_to_extend_the_life_of_your_dropped/). Change the function that runs in `check_death.mcfunction` to your xp function (see below):
`xp add <YourPlayerName> -10 levels`
`scoreboard players set <YourPlayerName> DeathCheck 0`
Just make sure to set up the death objective first with \`/scoreboard objectives add deaths deathCount\`