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

25 lines
589 B
Java
Raw Normal View History

package com.massivecraft.factions.task;
2013-04-09 13:15:25 +02:00
import com.massivecraft.factions.ConfServer;
2013-04-09 13:22:23 +02:00
import com.massivecraft.factions.FPlayerColl;
2013-04-09 13:00:09 +02:00
import com.massivecraft.factions.Factions;
public class AutoLeaveTask implements Runnable
{
double rate;
public AutoLeaveTask()
{
2013-04-09 13:15:25 +02:00
this.rate = ConfServer.autoLeaveRoutineRunsEveryXMinutes;
}
public void run()
{
2013-04-12 08:56:26 +02:00
FPlayerColl.get().autoLeaveOnInactivityRoutine();
// maybe setting has been changed? if so, restart task at new rate
2013-04-09 13:15:25 +02:00
if (this.rate != ConfServer.autoLeaveRoutineRunsEveryXMinutes)
Factions.get().startAutoLeaveTask(true);
}
}