Kills entities (players, mobs, items, etc.).
Syntax
Java Edition
kill [<targets>]
Bedrock Edition
kill [target: target]
Arguments
JE: <targets>: entity
BE: target: target: CommandSelector<Actor>
- Specifies the target(s) to kill. If not specified, defaults to the player who executed the command.
- Must be a player name, a target selector or a UUID[Java Edition only].
Notes
On success, directly kills 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. Entities that have over 3.402×1038 absorption points (1.701×1038 absorption hearts) take damage from the /kill command but do not die.
In Bedrock Edition, players in creative mode cannot be killed.
Result
| Command | Trigger | Java Edition | Bedrock Edition |
|---|---|---|---|
| any | the arguments are not specified correctly | Unparseable | Unparseable |
<targets> or target: target is not specified when the command's executor is not an entity | Failed | Failed | |
<targets> or target: target fails to resolve to one or more entities (named players must be online) | |||
| all the targets are creative-mode players. | Successful | ||
| Otherwise | Kills the entities. | ||
Output
| Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
|---|---|---|---|---|---|
| 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 |
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:
- To kill all arrows that are stuck in a target:
kill @e[type=arrow,nbt={inBlockState:{Name:"minecraft:target"}}]
History
| Java Edition Alpha | |||||
|---|---|---|---|---|---|
| v1.2.6 | Added /kill. | ||||
| Java Edition | |||||
| 1.3.1 | 12w16a | /kill is now usable in singleplayer. | |||
Parsing of the command is now more strict, rejecting extra characters after the command name (such as /killme or /killed). However, arguments are still ignored, meaning /kill playername still only kills the executor. | |||||
/kill now uses void damage instead of generic damage, bypassing armor. The death message is now "player fell out of the world" instead of "player died". | |||||
/kill now prints the message "Ouch! That looked like it hurt" on execution. | |||||
| 1.6.1 | 13w24b | The damage dealt by /kill is changed from 1,000 to 3.4×1038. | |||
| 1.8 | 14w02a | Added (player|entity) argument to /kill. | |||
| Replaced the "Ouch! That looked like it hurt" message with "Killed player". | |||||
| 14w02c | To fix MC-44371, /kill now directly kills non-living targets, rather than dealing 3.4×1038 void damage. | ||||
| 1.13 | 17w45a | target argument is no longer optional. | |||
| 1.15 | 19w38a | target argument is once again optional. | |||
| Pocket Edition Alpha | |||||
| v0.16.0 | build 1 | Added /kill. | |||