Factions/src/com/massivecraft/factions/task/AutoLeaveTask.java

25 lines
589 B
Java

package com.massivecraft.factions.task;
import com.massivecraft.factions.ConfServer;
import com.massivecraft.factions.FPlayerColl;
import com.massivecraft.factions.Factions;
public class AutoLeaveTask implements Runnable
{
double rate;
public AutoLeaveTask()
{
this.rate = ConfServer.autoLeaveRoutineRunsEveryXMinutes;
}
public void run()
{
FPlayerColl.get().autoLeaveOnInactivityRoutine();
// maybe setting has been changed? if so, restart task at new rate
if (this.rate != ConfServer.autoLeaveRoutineRunsEveryXMinutes)
Factions.get().startAutoLeaveTask(true);
}
}