Merge docs for 'player swinging events.'
This commit is contained in:
1 parent
f54ab746fe
commit
2f6141f44b
1 file changed
+10
@@ -3229,6 +3229,11 @@ Boolean, true if the entity is swimming.
|
||||
|
||||
Boolean, true if the entity is jumping.
|
||||
|
||||
### `query(e, 'swinging')`
|
||||
|
||||
Returns `true` if the entity is actively swinging their hand, `false` if not and `null` if swinging is not applicable to
|
||||
that entity.
|
||||
|
||||
### `query(e, 'gamemode')`
|
||||
|
||||
String with gamemode, or `null` if not a player.
|
||||
@@ -4081,6 +4086,11 @@ the slot.
|
||||
### `__on_player_swaps_hands(player)`
|
||||
Triggered when a player sends a command to swap their offhand item. Executed before the effect is applied on the server.
|
||||
|
||||
### `__on_player_swings_hand(player, hand)`
|
||||
Triggered when a player starts swinging their hand. The event typically triggers after a corresponding event that caused it
|
||||
(`player_uses_item`, `player_breaks_block`, etc.), but it triggers also after some failed events, like attacking the air. When
|
||||
swinging continues as an effect of an action, no new swinging events will be issued until the swinging is stopped.
|
||||
|
||||
### `__on_player_attacks_entity(player, entity)`
|
||||
Triggered when a player attacks entity, right before it happens server side.
|
||||
|
||||
|
||||
Reference in new issue
Block a user