From 2f6141f44bc2696de9dd8cfcb965d0822685852b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 20 Dec 2020 22:36:02 +0000 Subject: [PATCH] Merge docs for 'player swinging events.' --- docs/scarpet/Full.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/scarpet/Full.md b/docs/scarpet/Full.md index f1823eb3..035c4560 100644 --- a/docs/scarpet/Full.md +++ b/docs/scarpet/Full.md @@ -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.