Commands/damage

Apply damage to the specified entities.

Usage
Only living entities, item entities, experience orb, end crystal, painting, lead knot, camera, boats, and minecarts can take damage.

End crystal explodes when damaged, no matter weather is 0 or not. Painting and lead knot is destroyed when damaged, no matter weather is 0 or not.

Item entities, experience orb, boats and minecarts do have health value, so they can be damaged. Armor stand has no health value, so it cannot be damaged.

Player in creative mode can't be damaged.

Arguments

 * Specifies the target(s) to damage.


 * Specifies the value of damage to deal to.
 * . And must be between 0 and 2147483647 (inclusive).


 * Specifies the type of the damage. Affects death messages for example.
 * All possible arguments are listed on the official add-on documentation.


 * Specifies the damager who dealt the damage. Should be one entity or player. Use limit argument to limit one player/entity only.

Output
Note that although item entities and end crystal did take the damage, they are considered undamaged.

And when is 0, all the entities are considered successfully damaged.

Examples

 * Let villager named  to deal  damage to nearby iron golem(s):

History
Comandos/damage 命令/damage