AirChange
com.jsmacrosce.jsmacros.client.api.event.impl.player.EventAirChange
Fires before the local player's air supply is set to a value divisible by 20; it does not report other values.
js
JsMacros.on("AirChange", JavaWrapper.methodToJava(function (event) {
if (0 >= event.air) {
Chat.log("Out of air");
} else if (60 >= event.air) {
Chat.log(`Only ${event.air} air left, about ${event.air / 20} seconds`);
}
}))Constructors
new EventAirChange
new EventAirChange(int air)#Initializes this event with the client core and the supplied air-supply value, stored unchanged.
Parameters:
air: supplied air-supply value
Fields
air
the air supply value being set on the local player.