Is there a way to kill every entity except players and armor stands? I've tried with

/kill @e[type=!Player,!ArmorStand]


/kill @e[type=!Player;!ArmorStand]

But it doesn't work. How can I do that?

marked as duplicate by Ben, aytimothy, Kevin Reid, Unionhawk, DrFish Feb 4 '15 at 6:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I'm not familiar with the /kill @e command because I don't regularly play in 1.8, but try /kill @e[type!= Player, ArmorStand] – Dorian Dore Feb 3 '15 at 20:14
  • @ModDL - not a duplicate. Yeah that's close, but it's @e[type!=Player,type!=ArmorStand], I believe – RetroCraft Feb 4 '15 at 3:18
  • Same thing, just replace the item with armor stand – ModDL Feb 4 '15 at 3:29

Run these commands first:

/scoreboard objectives add blackList dummy

Run these on a clock:

/scoreboard players set @e blackList 1
/scoreboard players set @e[type=Player] blackList 0
/scoreboard players set @e[type=ArmorStand] blackList 0

Lastly kill all entities that don't have a blackList score of 0:

/kill @e[score_blackList_min=1]

(edited 5/26/19 for Minecraft 1.14.1)

  • Since selectMe scoreboard objective didn't exist, I replaced it with blacklist and it worked like a charm :D Thank you very much ;) – Dj_Mike238 Feb 4 '15 at 21:29
  • 2
    oops, made a mistake there – ModDL Feb 5 '15 at 1:50
  • There should be no spaces between score_blacklist_min[SPACE]=[SPACE]1, that gives the error: The entity UUID provided is in an invalid format – Julian Declercq Nov 4 '16 at 12:25
  • @Maximuym please add the content of your edit as a new answer. – RudolfJelin Dec 1 '16 at 17:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.