You can do that by tagging the banner item and killing items around the dead player that don't have the tag. Note that this will kill all other items in a radius of 3 blocks from the dying player, the items won't necessarily be the ones the player owned, could also kill other items on the ground around them.
To do this set up this scoreboard objective first by running this in chat
/scoreboard objectives add dead deathCount
Then have a chain of command blocks like this:
/execute @a[score_dead_min=1] ~ ~ ~ /scoreboard players tag @e[type=Item] add saveBanner {Item:{id:"minecraft:banner"}}
/execute @a[score_dead_min=1] ~ ~ ~ /kill @e[type=Item,tag=!saveBanner,r=3]
/scoreboard players set @a[score_dead_min=1] dead 0
I actually found a super easy way accidentally! If I enchant every item with the new curse of vanishing it should work because it will just not drop on death so I will have to give everything the enchantment but thanks for the help! I might use this way if the curse of vanishing does not work
what I want is when you die instead of dropping every item on the ground you only drop 1. The other items would get ./kill but I am trying to prevent a banner from being deleted any help?
hello I am trying to test for a player holding a banner on a specific team for a CTF game and I'm using this command
/testfor @p[x,y,z,r=0,rm=10,team=red]
for some reason the command above does not work. Do I need to change the x y and z to specific coords? Also if you could figure out if the person has a banner in their inventory it would help out a lot thanks!
0
I actually found a super easy way accidentally! If I enchant every item with the new curse of vanishing it should work because it will just not drop on death so I will have to give everything the enchantment but thanks for the help! I might use this way if the curse of vanishing does not work
0
what I want is when you die instead of dropping every item on the ground you only drop 1. The other items would get ./kill but I am trying to prevent a banner from being deleted any help?
0
hello I am trying to test for a player holding a banner on a specific team for a CTF game and I'm using this command
/testfor @p[x,y,z,r=0,rm=10,team=red]
for some reason the command above does not work. Do I need to change the x y and z to specific coords? Also if you could figure out if the person has a banner in their inventory it would help out a lot thanks!
0
IGN: MattJamesA