/

/swing

op 2Entities

/swing was added in 26.1 and plays the arm-swing animation on an entity without dealing damage. It is a presentation command — useful for NPCs and cutscenes.

Commandready
9
/swing @e
Press C to copy
optional
All entities
@e

Who or what the command applies to

optional

Examples

  • Swing your arm
    /swing @s mainhand

Common questions about /swing

Does /swing hurt anything?

No. It plays the animation only; nothing is attacked and no item durability is used.

How do I make a mob look like it is actually attacking?

Pair it with /damage. /swing plays the animation and /damage applies the hit, which together read as a real attack; on their own each is only half of one.