he SwingArmEvent is fired whenever a Player waves an arm. This can be the left arm or the right arm.
This event is fired on three occasions:
just before the RightClickBlockEvent
just before the LeftClickBlockEvent
when the player does a left-click into the air.
The SwingArmEvent class is a subtype of the Event class and inherits all its properties and functions.
Here is an overview of the SwingArmEvent properties:
Property | Type | read / write |
---|---|---|
hand | string | r |
item | Item | r |
player | Player | r |
Below you find short descriptions about each of the properties and some examples about how to use them in your spells.
he hand the player waved. Can be ‘MAIN_HAND’ or ‘OFF_HAND’.
The item in the player’s hand.
The player that triggered this event.