Skip to content

FallFlying ​

com.jsmacrosce.jsmacros.client.api.event.impl.player.EventFallFlying

Not cancellable

Fires when the local player's polled fall-flying state differs from the previous sample.
The state is checked once per client tick while a player is present. The previous sample is retained while no player is present, including across disconnects, so a later event may compare different player instances.

js
JsMacros.on("FallFlying", JavaWrapper.methodToJava(function (event) {
 if (event.state) {
   Chat.log("Elytra flight started");  
 } else {
   Chat.log("Elytra flight ended");  
 }
}))

Constructors ​

new EventFallFlying ​

new EventFallFlying(boolean state)#
Initializes the event with the supplied fall-flying state.

Parameters:

  • state: the supplied fall-flying state

Fields ​

state ​

state: booleanread-only#
The newly sampled fall-flying state: true if fall-flying, false otherwise.

Methods ​

toString ​

toString(): String#
Returns an event-name and stored-state diagnostic in the format %s:{"state": %s}, with the payload rendered as true or false; this is not JSON.
Returns: the event name and stored state in the diagnostic format