ddf054330a
Boards can be toggled with /f sb. Toggles are persistent in a yml file. Also fix some small spelling and format things that were really bugging me.
29 lines
734 B
Java
29 lines
734 B
Java
package com.massivecraft.factions.util;
|
|
|
|
import com.massivecraft.factions.Conf;
|
|
import com.massivecraft.factions.P;
|
|
|
|
public class AutoLeaveTask implements Runnable {
|
|
|
|
private static AutoLeaveProcessTask task;
|
|
double rate;
|
|
|
|
public AutoLeaveTask() {
|
|
this.rate = Conf.autoLeaveRoutineRunsEveryXMinutes;
|
|
}
|
|
|
|
public synchronized void run() {
|
|
if (task != null && !task.isFinished()) {
|
|
return;
|
|
}
|
|
|
|
task = new AutoLeaveProcessTask();
|
|
task.runTaskTimer(P.p, 1, 1);
|
|
|
|
// maybe setting has been changed? if so, restart this task at new rate
|
|
if (this.rate != Conf.autoLeaveRoutineRunsEveryXMinutes) {
|
|
P.p.startAutoLeaveTask(true);
|
|
}
|
|
}
|
|
}
|