Wiki ArticleJava EditionInformation neededCommands
/swing
Controls the swinging animation of entities' hands.​[more information needed]
This feature is exclusive to Java Edition.
/swing| Permission level required |
2 |
|---|---|
| Restrictions | None |
Controls the swinging animation of entities' hands.[more information needed]
Syntax
/swing [<targets>] [<mainhand|offhand>]
Arguments
<targets>: entity
- Specifies entities to swing. Defaults to the command executor.
- Not all entities[more information needed] will animate a swing on the client side.
- Must be a player name, a target selector or a UUID.
<mainhand|offhand>
- Specifies the arm to swing. Defaults to mainhand.
Result
| Command | Trigger | Java Edition |
|---|---|---|
| Any | The command is incomplete, or any argument is not specified correctly. | Unparseable |
<targets> fails to resolve to one or more entities. | Failed | |
| Otherwise | Successful |
Output
| Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
|---|---|---|---|---|---|
| Any | Java Edition | On fail | 0 | 0 | 0 |
| On success | 1 | 1 | the number of targeted entities |
History
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 26.1 | snap1 | Added /swing. | |||||
| snap3 | Both arguments are now optional, and default to @s and mainhand respectively. | ||||||