OmniGame logoOmniGame

/damage Command

Inflicts a specified amount of damage of a given damage type on the target entity. The optional source position or entity affects knockback direction and death messages.

Syntax
damage <target> <amount> [<damageType>] [at <location> | by <entity> [from <cause>]]
Permission: 2 (gamemaster / cheats enabled)Edition: Java

Examples

/damage @p 10/damage @e[type=minecraft:zombie] 100 minecraft:magic/damage @p 5 minecraft:fall/damage @a 2 minecraft:player_attack by @e[type=minecraft:skeleton,limit=1]

Notes

Java Edition exclusive (added in 1.19.4). The damage amount is a non-negative float. The damageType must be a registered damage type resource location (e.g. minecraft:fall, minecraft:magic, minecraft:player_attack, minecraft:sonic_boom, minecraft:mace_smash). If the damage type is omitted, minecraft:generic is used. Damage bypasses godmode and absorption can still apply depending on type.

More commands