2012-02-26 23:55:58 +01:00
|
|
|
package com.massivecraft.factions.util;
|
|
|
|
|
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;
|
2012-02-26 23:55:58 +01:00
|
|
|
|
|
|
|
public class AutoLeaveTask implements Runnable
|
|
|
|
{
|
|
|
|
double rate;
|
|
|
|
|
|
|
|
public AutoLeaveTask()
|
|
|
|
{
|
2013-04-09 13:15:25 +02:00
|
|
|
this.rate = ConfServer.autoLeaveRoutineRunsEveryXMinutes;
|
2012-02-26 23:55:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void run()
|
|
|
|
{
|
2013-04-12 08:56:26 +02:00
|
|
|
FPlayerColl.get().autoLeaveOnInactivityRoutine();
|
2012-02-26 23:55:58 +01:00
|
|
|
|
|
|
|
// 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)
|
2013-04-09 13:12:13 +02:00
|
|
|
Factions.get().startAutoLeaveTask(true);
|
2012-02-26 23:55:58 +01:00
|
|
|
}
|
|
|
|
}
|