/damage Command Generator
BetaPick a target, how much damage and what kind, and optionally who dealt it. The preview knocks the hearts off a 10-heart player and shows the death message when it is enough to kill.
Describe it — AI writes the command
Type what you want in plain words. The AI fills the form below, so you can see it and change anything. It follows the edition and version you picked.
Checking the AI…
Paste a command— edit it here or move it to another version
Your command · Java 26.3
27 characters/damage @p 6 minecraft:fall
Raw editor
How it works
Damage is counted in half-hearts: 2 is one heart, 20 is a full health bar.
Java 1.19.4 and later
damage @p 6 minecraft:fall damage @p 4 minecraft:generic at ~ ~5 ~ damage @p 5 minecraft:mob_attack by @e[type=zombie,limit=1,sort=nearest] damage @p 4 minecraft:arrow by @e[type=arrow,limit=1,sort=nearest] from @e[type=skeleton,limit=1,sort=nearest]
The amount can have decimals. The damage type decides the death message and what reduces it (Fire Resistance stops in_fire, Feather Falling softens fall). at sets where the hit comes from, by names the attacker and from the entity behind it, such as the skeleton that shot the arrow. Both by and from take a single entity, so selectors need limit=1. Java 1.19.2 and older have no /damage.
Bedrock 1.18.10 and later
damage @p 6 fall damage @p 5 entity_attack entity @e[type=zombie,c=1]
Bedrock takes whole numbers and calls the type a cause (fire_tick, drowning, entity_attack…). There is no position or from part, and when you name an attacker the cause must come first. self_destruct was called suicide before 1.20.70. When you switch editions, the generator swaps the type for the nearest one the other edition has.
Armour, Protection and Resistance still reduce /damage, so a fully armoured player loses less than the preview shows. For damage over time use /effect with Poison or Wither; to make your own damage type, use the damage type generator.
FAQ
How much is 1 damage in hearts?
Half a heart. A player has 20 health, which is 10 hearts, so damage @p 20 takes a full, unarmoured health bar.
Does /damage ignore armour?
No. It works like a normal hit of that damage type, so armour, Protection, Resistance and the type's own rules (Fire Resistance, Feather Falling) all apply. To kill outright, use /kill or a huge amount.
Why does my /damage command fail on Java 1.19.2?
/damage was added in Java 1.19.4. Older versions can only use /kill or the Instant Damage effect.
How do I make it look like a zombie hit the player?
Java: damage @p 4 minecraft:mob_attack by @e[type=zombie,limit=1,sort=nearest]. Bedrock: damage @p 4 entity_attack entity @e[type=zombie,c=1]. The death message then names the zombie.
What damage types can I use?
Java reads them from the damage_type registry (fall, lava, in_fire, magic, arrow, sonic_boom…), and data packs can add more. Bedrock has a fixed list of causes such as fall, fire, drowning, magic and projectile. The type field suggests the ones your version has.