20 lines
490 B
Java
20 lines
490 B
Java
package games.dmg.leaf;
|
|
|
|
import java.util.Objects;
|
|
|
|
/** Periodically restores eligible protection after effects are cleared or expire. */
|
|
public final class LeafRecoveryTask implements Runnable {
|
|
static final long INTERVAL_TICKS = 20L;
|
|
|
|
private final LeafRuntime runtime;
|
|
|
|
public LeafRecoveryTask(LeafRuntime runtime) {
|
|
this.runtime = Objects.requireNonNull(runtime, "runtime");
|
|
}
|
|
|
|
@Override
|
|
public void run() {
|
|
runtime.reconcileAllOnline();
|
|
}
|
|
}
|