Commands/kill

From Minecraft Wiki
Jump to: navigation, search
kill
Restrictions

Operator

First introduced

Alpha v1.2.6 (0.2.8)
PE Alpha 0.16.0 (PE Alpha 0.16.0 build 1)

Kills entities (players, mobs, items, etc.).

Syntax[edit]

Java Edition

kill [<targets>]

Bedrock Edition

kill [target: target]

Arguments[edit]

<targets> (BE: target: target)

Specifies the target(s) to be killed. Must be a player name, a target selector, or a UUID[Java Edition only].
If not specified, defaults to the executor who executed the command. Not optional if executor isn't an entity.
Permits entities other than players (including "non-living" entities like items, minecarts, etc.).

Result[edit]

Fails if <targets> fails to resolve to one or more entities (named players must be online), or if the targeted player is in Creative mode in Bedrock Edition[verify].

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 and experience orbs if they are targeted.

Examples[edit]

  • 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: kill @e[distance=..10]
  • To kill all entities except players: kill @e[type=!player]

History[edit]

Java Edition Alpha
v1.2.6Added /kill.
Java Edition
1.3.112w16a/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.113w24bThe damage dealt by /kill is changed from 1,000 to 3.4×1038.
1.814w02aAdded (player|entity) argument to /kill.
Replaced the "Ouch! That looked like it hurt" message with "Killed player".
14w02cTo fix MC-44371, /kill now directly kills non-living targets, rather than dealing 3.4×1038 void damage.
1.1317w45atarget argument is no longer optional.
1.1519w38atarget argument is once again optional.
Pocket Edition Alpha
0.16.0build 1Added /kill.