How to damage a player in Minecraft
Type /damage @p 4 minecraft:fall in chat as an operator to deal 4 points (two hearts) of fall damage to the nearest player.
damage
Deals a set amount of damage to an entity, with an optional damage type, source position or attacker.
/damage <target> <amount> [<damageType>] [at <location>|by <entity> [from <cause>]] Examples
/damage @p 4 minecraft:fall Deals two hearts of fall damage to the nearest player.
/damage @e[type=minecraft:zombie,limit=1,sort=nearest] 10 minecraft:player_attack by @p Hurts a zombie as if the nearest player hit it.
Arguments
targetRequired- One entity to damage.
amountRequired- Damage in health points (2 = one heart).
damageTypeOptional- Damage type ID, for example
minecraft:fallorminecraft:magic.
What it does
The amount is in health points, where 2 points is one heart. Armor, enchantments and resistance still reduce the damage unless the damage type ignores them. Add at <location> or by <entity> so the damage looks like it came from a place or attacker, which affects knockback and death messages.
Good to know
- Needs operator permission level 2.
Run it on your server
On a SLASHPLAY server, type it in the Console tab without the leading slash; in game, operators type it in chat with the slash. New to this? Start a Minecraft server first.
Your own
Minecraft server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.