New java class (call it what you want)
public class NAMEHEREConditionalSleep extends ConditionalSleep {
private final Script SCRIPT;
public NAMEHEREConditionalSleep(int arg0, Script script) {
super(arg0);
this.SCRIPT = script;
}
@Override
public boolean condition() {
return CONDITION HERE(If this is true, it will sleep.);
}
}
An example of a somthing to put in CONDITION HERE would be
return client.getMyPlayer().isAnimating();
Now whenever you call you conditional sleep, and your playing is animating, it will sleep until he stops animating.
Hope this helped! enjoy!