Waiting

open class Waiting

Utilities for waiting (variable sleeps based on a condition and static waits). All numbers are milliseconds.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun wait(millis: Int)
Waits for the specified milliseconds
Link copied to clipboard
open fun waitNormal(mean: Int, std: Int)
Waits for a random amount of time, using the mean/sd parameters in a normal distribution to pick a random value
Link copied to clipboard
open fun waitUniform(min: Int, max: Int)
Waits for a random amount of time, using the min/max range in a uniform distribution to pick a random value
Link copied to clipboard
open fun waitUntil(condition: BooleanSupplier): Boolean
Waits until the specified condition is true, or times out after around 10 seconds
open fun waitUntil(timeout: Int, condition: BooleanSupplier): Boolean
open fun waitUntil(timeout: Int, step: Int, condition: BooleanSupplier): Boolean
Waits until the specified condition is true, or the timeout limit is reached
Link copied to clipboard
open fun waitUntilAnimating(timeout: Int): Boolean
Waits until my player is animating, or the timeout limit is reached
Link copied to clipboard
open fun waitUntilInArea(area: Area, timeout: Int): Boolean
Waits until my player is in the specified area, or the timeout limit is reached