Merge branch 'master' into 1.17

This commit is contained in:
gnembon committed 2020-12-20 19:27:04 -04:00
commit 941b7d4836
9 files changed
+71 -4

No files matched your search

+10
View File
@@ -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.
+5
View File
@@ -344,6 +344,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.
+5
View File
@@ -137,6 +137,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.
+6 -3
View File
@@ -23,9 +23,12 @@ __on_player_right_clicks_block(player, item_tuple, hand, block, face, hitvec) ->
__on_player_starts_sneaking(player) ->
__on_player_starts_sprinting(player) ->
__on_player_stops_sneaking(player) ->
__on_player_stops_sprinting(player) ->
__on_player_stops_sprinting(player) ->
__on_player_swings_hand(player, hand) ->
__on_player_switches_slot(player, from, to) ->
__on_player_swaps_hands(player) ->
__on_player_swaps_hands(player) ->
__on_player_takes_damage(player, amount, source, entity) ->
__on_player_trades(player, entity, buy_left, buy_right, sell) ->
__on_player_uses_item(player, item_tuple, hand) ->
__on_player_wakes_up(player) ->
__on_player_escapes_sleep(player) ->
@@ -38,4 +41,4 @@ __on_player_deals_damage(player, amount, entity) ->
__on_player_dies(player) ->
__on_player_respawns(player) ->
__on_player_disconnects(player, reason) ->
__on_player_connects(player) ->
__on_player_connects(player) ->
@@ -118,8 +118,11 @@
__on_player_starts_sprinting
__on_player_stops_sneaking
__on_player_stops_sprinting
__on_player_swings_hand
__on_player_switches_slot
__on_player_swaps_hands
__on_player_takes_damage
__on_player_trades
__on_player_uses_item
__on_player_wakes_up
__on_player_escapes_sleep