Apply Damage to Players and Entities
The /damage command lets you apply a chosen amount of damage directly to a single player or entity in Minecraft Java Edition. You can specify the exact decimal number of damage points and optionally set a damage type, a location, an attacking entity, or a direct cause.
Map makers and server operators use this command to create custom hazards, test health systems, or simulate combat events without spawning hostile mobs. Because it requires permission level 2, you must be a server operator or have cheats turned on in your single-player world to run it.
/damage <target> <amount>/damage <target> <amount> <damageType>/damage <target> <amount> <damageType> at <location>/damage <target> <amount> <damageType> by <entity>/damage <target> <amount> <damageType> by <entity> from <cause>/damage <target> <amount>/damage <target> <amount> <damageType>/damage <target> <amount> <damageType> at <location>/damage <target> <amount> <damageType> by <entity>/damage <target> <amount> <damageType> by <entity> from <cause>| Argument | Type | What it means |
|---|---|---|
<target> | target selector one target | Selects the single entity or player to receive the damage, using a player name, a UUID, or a target selector like @p or @s. |
<amount> | decimal number at least 0.0 | Sets how much damage to deal as a decimal number that must be at least 0.0, such as 0.5. |
<damageType> | registry entry damage type | Specifies the registry entry for the kind of damage being applied. |
<location> | position | Defines the three x, y, and z coordinates where the damage originates, supporting decimal numbers as well as ~ and ^ notation. |
<entity> | target selector one target | Identifies the single player or entity responsible for dealing the damage, chosen with a name, UUID, or target selector. |
<cause> | target selector one target | Identifies the single direct entity that caused the damage on behalf of the attacker, using a player name, UUID, or target selector. |
/damage @p 2Applies 2 points of damage to the nearest player.
/damage @s 0.5Deals a small 0.5 decimal amount of damage to the entity or player running the command.
/damage Steve 4.0Inflicts 4.0 points of damage directly to the player named Steve.
/damage Alex 6Applies 6 points of damage to the player named Alex.
/damage @e[limit=1] 10Deals 10 points of damage to a single selected entity in the world.
/damage @a[limit=1] 0.0Applies 0.0 damage to one player, triggering a hit without lowering their health.
Measured from the game files of every Java release from 1.13 to 26.3.
Bedrock Edition also includes the /damage command, but its syntax and argument rules are different. In Bedrock, the amount must be a whole integer rather than a decimal, and the command uses /damage <target: target> <amount: int> [cause: DamageCause] or /damage <target: target> <amount: int> <cause: DamageCause> entity <damager: target> instead of Java's registry types and location options.
The /damage command was added to Minecraft Java Edition in version 1.19.4 and continues to be available through version 26.3.
No, the <target> argument only accepts a single target, so selectors like @a or @e will fail if they match more than one player or entity.
You need permission level 2 to run the command, which means you must be a server operator or have cheats enabled in single-player.
/advancement/attribute/defaultgamemode/effect/experience/gamemode/kill/ride/rotate/spawnpoint/spectate/spreadplayers/summon/swing/teleport/tp