OGTOOLS

Minecraft /swing command

Swings a player's or entity's arm as if hitting; adds life to mannequins and scenes.

🐷 Mobs and entities Operator (level 2) Needs cheats enabled Java Edition 26.3

Syntax

/swing
/swing [<targets>] [mainhand|offhand] [whack|stab] [<duration>]

Parts in square brackets are optional, parts in angle brackets are required. You do not type the brackets: Put your own value in their place.

Arguments

ArgumentWhat it does
[<targets>] The entities that swing their arm. Leave it out to swing your own.
mainhand / offhand Main hand or off hand.
whack / stab Animation type: A whack or a stab (added in 26.3).
[<duration>] The animation's duration; 6 ticks by default, and it can also be written with a suffix like 1s.

Examples

/swing

Swings your own arm.

/swing @e[type=minecraft:mannequin] offhand stab 1s

Makes every mannequin do a one-second off-hand stab.

Good to know

  • Added in 26.1; the animation and duration options came in 26.3.
  • Only works on living entities.

How do I run this command?

Press T in game to open chat (or press / directly), type the command and press Enter. While typing, Tab completes the options. This command counts as a cheat: It needs cheats enabled in a singleplayer world, and operator permission on a server (operator (level 2)).

Related commands

🐷 More Mobs and entities

Another tool Minecraft crafting recipes Would rather make the item than give it with a command? See the recipe on the 3x3 grid.

Minecraft is a product of Mojang Studios. This tool is an independent helper made for players and is not affiliated with Mojang or Microsoft.