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
The newly sampled fall-flying state:
true if fall-flying, false otherwise.