Kills entities (players, mobs, items, etc.).
kill [target: target]
- Must be a player name, a target selector or a UUID[Java Edition only].
- Specifies the target(s) to kill. If not specified, defaults to the executor who executed the command.
|Command||Trigger||Java Edition||Bedrock Edition|
|any||the arguments are not specified correctly||Unparseable||Failed|
|if all the players are in creative mode.||Successful|
|On success||Kills the entities.|
|any||Java Edition||On fail||0||0||0|
|On success||1||1||the number of targeted entities|
|Bedrock Edition||On fail||0||N/A||N/A|
|On success||the number of entities that are killed||N/A||N/A|
On success, directly kills non-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 are not already of minimum size spawn smaller ones. Destroys boats, minecarts, loose items, paintings, armor stands, and experience orbs if they are targeted.
In Bedrock Edition, players in creative mode cannot be killed.
- To kill the player executing the command:
- To kill the player Steve:
- To kill item entities:
- To kill all entities within 10 blocks:
- To kill all entities except 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 , |
|1.13||17w45a||target argument is no longer optional.|
|1.15||19w38a||target argument is once again optional.|
|Pocket Edition Alpha|
|0.16.0||build 1||Added |