Kills entities (players, mobs, items, etc.).
- Java Edition
- Bedrock Edition
kill [target: target]
- targets (BE: target: target)
- Specifies the target(s) to be killed (including "non-living" entities like items, vehicles, etc.). Must be a player name or a target selector. The target is not optional in command blocks.
- Fails if target fails to resolve to one or more entities (named players must be online), or if the targeted player is in Creative mode.[BE only]
- On success, directly kills non-living targets, or inflicts 3.4 x 1038 void damage to living targets — even if they are protected by a high-level Resistance effect or by a Totem of undying — and issues the appropriate death message. Players and mobs killed this way drop loot, and slimes and magma cubes that aren't already of minimum size spawn smaller ones. Destroys boats, minecarts, loose items and experience orbs if they are targeted.
- To kill yourself:
- To kill the player Bob:
- To kill item entities:
- To kill all entities, including yourself:
- To kill all entities but players:
|Java Edition Alpha|
|Parsing of the command is now more strict, rejecting extra characters after the command name (such as |
|1.6.1||13w24b||The damage dealt by |
|Replaced the "Ouch! That looked like it hurt" message with "Killed player".|
|14w02c||To fix , |
|Pocket Edition Alpha|
|0.16.0||build 1||Added |