2012-02-26 23:55:58 +01:00
|
|
|
package com.massivecraft.factions.util;
|
|
|
|
|
|
|
|
import com.massivecraft.factions.Conf;
|
|
|
|
import com.massivecraft.factions.FPlayers;
|
2013-04-09 13:00:09 +02:00
|
|
|
import com.massivecraft.factions.Factions;
|
2012-02-26 23:55:58 +01:00
|
|
|
|
|
|
|
public class AutoLeaveTask implements Runnable
|
|
|
|
{
|
|
|
|
double rate;
|
|
|
|
|
|
|
|
public AutoLeaveTask()
|
|
|
|
{
|
|
|
|
this.rate = Conf.autoLeaveRoutineRunsEveryXMinutes;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void run()
|
|
|
|
{
|
|
|
|
FPlayers.i.autoLeaveOnInactivityRoutine();
|
|
|
|
|
|
|
|
// maybe setting has been changed? if so, restart task at new rate
|
|
|
|
if (this.rate != Conf.autoLeaveRoutineRunsEveryXMinutes)
|
2013-04-09 13:12:13 +02:00
|
|
|
Factions.get().startAutoLeaveTask(true);
|
2012-02-26 23:55:58 +01:00
|
|
|
}
|
|
|
|
}
|