/damage Command in Minecraft Java Edition

Apply Damage to Players and Entities

Java EditionPlayers & EntitiesPermission: Level 2Added in 1.19.4Bedrock version →

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.

Syntax (Java 26.3, 5 forms)

  1. /damage <target> <amount>
  2. /damage <target> <amount> <damageType>
  3. /damage <target> <amount> <damageType> at <location>
  4. /damage <target> <amount> <damageType> by <entity>
  5. /damage <target> <amount> <damageType> by <entity> from <cause>

The forms you will use most

/damage <target> <amount>
Deals a specific amount of damage to a single target without setting a custom damage type or source.
/damage <target> <amount> <damageType>
Deals a specific amount of damage to a single target using a chosen damage type from the game registry.
/damage <target> <amount> <damageType> at <location>
Deals damage of a specific registry type to a target as if the harm came from a set of coordinates.
/damage <target> <amount> <damageType> by <entity>
Deals damage of a specific registry type to a target and credits another entity as the attacker.
/damage <target> <amount> <damageType> by <entity> from <cause>
Deals damage of a specific registry type to a target while specifying both the attacking entity and the direct cause entity.

Arguments

ArgumentTypeWhat 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>positionDefines 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.

Examples

Version history

Measured from the game files of every Java release from 1.13 to 26.3.

  1. 1.19.4 Command added.

Tips

Common mistakes

Java vs Bedrock

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.

See /damage in Bedrock Edition →

FAQ

When was the /damage command added to Minecraft Java Edition?

The /damage command was added to Minecraft Java Edition in version 1.19.4 and continues to be available through version 26.3.

Can I damage multiple players at once with /damage?

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.

What permission level is required to use /damage?

You need permission level 2 to run the command, which means you must be a server operator or have cheats enabled in single-player.

Related commands

/advancement/attribute/defaultgamemode/effect/experience/gamemode/kill/ride/rotate/spawnpoint/spectate/spreadplayers/summon/swing/teleport/tp