
Command
/kill
Kills entities: players, mobs and anything else, such as dropped items.
| /kill [<targets>] |
| Argument | Kind of value | What to type |
|---|---|---|
| <targets> | Target selector | The entities to kill, as a player name or a target selector. Defaults to whoever runs the command. One or more entities. |
| Permission level | 2: operators, worlds with cheats on, command blocks and functions |
| Works in | Operators on multiplayer servers, singleplayer worlds with cheats enabled, and command blocks and functions. |
| Result | Reports "Killed <entity>" or "Killed <number> entities". The number /execute store saves is the number of entities killed. |
| No target | Without a target the command kills whoever runs it. It then has to be run by an entity, so a command block or the server console must name a target. |
| All entity types | A selector such as @e matches every kind of entity, including players, dropped items, Minecarts and Armor Stands. Narrow it with type or distance to avoid removing more than intended. |
| No match | If the selector matches nothing, the command fails with "No entity was found". |
/killKills you.
/kill @e[type=minecraft:zombie]Kills every loaded Zombie.
/kill @e[type=minecraft:item]Removes every dropped item.
/kill @e[type=minecraft:experience_orb]Removes every Experience Orb.
/kill @e[type=!minecraft:player,distance=..20]Kills everything within 20 blocks of you except players.
/kill @e[type=minecraft:creeper,limit=1,sort=nearest]Kills the nearest Creeper.




