mojira.dev
MC-52757

A command bug with the /kill command (More info in description/environment)

So, basically, it has to do with the /kill command. I was trying to figure out how to kill an item that is specifically a chest, and no other items (which by the way, I failed at 😛) Anyways, I used the command /kill @e[type=Item] and that killed all items as expected. But, after that, I added a space and some other text, and it was kind of like a testfor command. Basically, if whatever is in the argument brackets is true, then it will kill the player who did the command. Here's an example. If I did
/kill @e[type=Pig] InsertAnyTextHere
then if there was a pig in the world, I would die. And if I did
/kill @e[type=Pig,name=Barney] InsertWhateverTextYouWantOverHere
then if there was a pig in the world that has a custom name of Barney, I would die again. It could really be used to map maker's advantage, but it's a bug that should be fixed. Thanks dudes!

Attachments

Comments 2

Cannot reproduce, are you sure you were on the snapshot? Older versions will kill you regardless of the [type=] due to the command intended to kill yourself in the older versions.

Confirmed for 14w25b

/kill @e[type=Pig] InsertAnyTextHere
This causes only you to die but you will the message
"Killed Marcono1234 (my player name)" as often as there were pigs even they didn't die

BlockerLocker

(Unassigned)

Unconfirmed

Minecraft 14w11b

Retrieved