Why do I die when I run "/kill @e [type=!player]"?

Why do I die when I run "/kill @e [type=!player]"? - Brown Wooden Blocks With Number 8

When I put

/kill @e [type=!player]

in a command block and power it, I die, even though players should be excluded. I need this command to be able to reset my mini-game map, but I don't know how to do it! Am I doing it wrong?

I've found other websites that say its just like that, so I don't know what I'm doing wrong.






Pictures about "Why do I die when I run "/kill @e [type=!player]"?"

Why do I die when I run "/kill @e [type=!player]"? - White and Black Polka Dot Sofa Chair
Why do I die when I run "/kill @e [type=!player]"? - Free stock photo of adult, architecture, best friends
Why do I die when I run "/kill @e [type=!player]"? - Free stock photo of adult, architecture, balcony



Does kill @E kill everything?

To prevent killing your own player, make sure to limit the command from killing yourself as well. For example, /kill @e[type=! player] will kill every entity except for your own player. Remember that some mobs will spawn additional mobs, such as slimes.

How do you kill an entity without killing a player?

Examples
  • To kill the player executing the command: kill @s.
  • To kill the player Steve: kill Steve.
  • To kill item entities: kill @e[type=item]
  • To kill all entities within 10 blocks: ...
  • To kill all entities except players: kill @e[type=!player]
  • To kill all creepers within 10 blocks:


  • What does kill @E mean?

    The @e target selector is used to target all entities in the game. This includes both players and mobs in the world. For example, you can use the @e selector with the /kill command to kill all enderman: /kill @e[type=enderman]

    How do you kill the Enderman command?

    Typing \u201c /kill \u201d any target in the console will destroy pretty much everything that can be removed, including the player.



    Minecraft Command Tutorial #3 - /kill, and /tag (little /xp)




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Brett Jordan, RODNAE Productions, RODNAE Productions, RODNAE Productions