I'm searching an efficient way with command block to remove armor on player death but throwing the rest normally.

With keepinventory on false, I'm trying to do a /replaceitem air on death, but the armor is thrown first and it's not working. I also tried to put a tag on item armor and kill it, but there is a problem if a player have two of the same type of armor in his inventory.

I have Spigot but I didn't find an updated plugin able to do that.


Give them the curse of vanishing, then they'll disappear on death.

A few options to achieve that:

  • Curse of vanishing book and anvil
  • /give @p diamond_helmet 1 0 {ench:[{id:71,lvl:1}]}
  • /replaceitem entity @s slot.armor.head diamond_helmet 1 0 {ench:[{id:71,lvl:1}]}
  • Thanks for you answer, I didn't think about that and i love the idea, but the player will not be able to enchant the armor with the table ? – Tom Jun 17 '18 at 11:02
  • That's correct. I don't really know a good workaround for that. I'll post an alternative answer. – Fabian Röling Jun 17 '18 at 13:40
  • 1
    "Curse of vanishing book and anvil, presumably" – pppery Jul 29 at 20:19

You can delete armour items on the ground:

/scoreboard players tag @e[type=item] add deleteMe {Item:{id:"minecraft:diamond_helmet"}}
/kill @e[tag=deleteMe]

But this will delete every dropped armour piece, so you should make it trigger based on death, for example with a deathCount statistic scoreboard.

  • Thanks again for the answer as I said in my question the problem is if the player wear an iron helmet with enchant and have others iron helmet in his inventory, on death it is not possible to distinguish them... and all will be deleted. the problem of other armor on the ground can be solved with the Age data – Tom Jun 17 '18 at 15:39
  • Well, then it's impossible. When the player is dead, his items are no longer in his inventory, so you can't figure out the slot. – Fabian Röling Jun 17 '18 at 16:42
  • 1
    This is what I think too, without a plugin I don't think it's possible, but since I'm not the best for command block I preferred to ask, thank a lot for your time – Tom Jun 17 '18 at 16:55

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.