Mastering Minecraft Mob Elimination: A Guide to the /kill
Command
There are many reasons you might want to eliminate mobs in Minecraft. The simplest method is using commands, specifically the /kill
command. However, even this seemingly straightforward command has some nuances. This guide explains how to use it effectively.
Prerequisites: Enabling Cheats
Before using any commands, ensure your world has cheats enabled. Instructions for enabling cheats are provided below.
The /kill
Command: Basics and Variations
The basic /kill
command is simply /kill
, but this will kill you. To target mobs, you need to add selectors.
-
Killing All Mobs: The command to kill all mobs (excluding the player) is:
/kill @e[type=!minecraft:player]
@e
selects all entities;[type=!minecraft:player]
excludes the player. -
Killing Specific Mob Types: To kill a specific mob type (e.g., chickens):
/kill @e[type=minecraft:chicken]
-
Killing Mobs Within a Radius: To kill mobs within a certain distance:
- Java Edition:
/kill @e[distance=..15]
(kills mobs within 15 blocks) - Bedrock Edition:
/kill @e[r=10]
(kills mobs within 10 blocks)
- Java Edition:
-
Killing Specific Mobs Within a Radius: Combine type and distance selectors:
- Java Edition:
/kill @e[distance=..15,type=minecraft:sheep]
(kills sheep within 15 blocks) - Bedrock Edition:
/kill @e[r=10,type=minecraft:sheep]
(kills sheep within 10 blocks)
- Java Edition:
The game will autocomplete commands, so precise memorization isn't necessary.
Important Selectors:
@p
: Nearest player@r
: Random player@a
: All players@e
: All entities@s
: Yourself
Enabling Cheats in Minecraft
Commands won't function without cheats enabled. Here's how to do it:
Java Edition:
- Enter your world.
- Press Esc, then select "Open to LAN."
- Toggle "Allow Commands" to "On." This is temporary; you'll need to repeat this each time you open the world. To permanently enable cheats, create a copy of the world with cheats enabled during world creation.
Bedrock Edition:
- Navigate to your worlds.
- Click the pencil icon next to the desired world.
- In the settings menu, toggle "Cheats" to "On."
Minecraft is available on PlayStation, Xbox, Nintendo Switch, PC, and mobile devices.