2013-04-18 12:29:56 +02:00
|
|
|
package com.massivecraft.factions.task;
|
2012-11-28 06:51:37 +01:00
|
|
|
|
2013-04-22 09:37:53 +02:00
|
|
|
import com.massivecraft.factions.entity.FactionColl;
|
2013-04-22 12:26:13 +02:00
|
|
|
import com.massivecraft.factions.entity.FactionColls;
|
2013-04-24 08:39:26 +02:00
|
|
|
import com.massivecraft.factions.entity.MConf;
|
2013-04-18 13:36:52 +02:00
|
|
|
import com.massivecraft.mcore.ModuloRepeatTask;
|
2012-11-28 06:51:37 +01:00
|
|
|
|
2013-04-23 12:14:36 +02:00
|
|
|
public class EconRewardTask extends ModuloRepeatTask
|
2013-04-10 09:47:32 +02:00
|
|
|
{
|
2013-04-18 13:36:52 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// INSTANCE & CONSTRUCT
|
|
|
|
// -------------------------------------------- //
|
2012-11-28 06:51:37 +01:00
|
|
|
|
2013-04-23 12:14:36 +02:00
|
|
|
private static EconRewardTask i = new EconRewardTask();
|
|
|
|
public static EconRewardTask get() { return i; }
|
2013-04-18 13:36:52 +02:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// OVERRIDE: MODULO REPEAT TASK
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public long getDelayMillis()
|
2012-11-28 06:51:37 +01:00
|
|
|
{
|
2013-04-24 08:39:26 +02:00
|
|
|
return MConf.get().taskEconMillis;
|
2012-11-28 06:51:37 +01:00
|
|
|
}
|
2013-04-18 13:36:52 +02:00
|
|
|
|
2012-11-28 06:51:37 +01:00
|
|
|
@Override
|
2013-04-18 13:36:52 +02:00
|
|
|
public void setDelayMillis(long delayMillis)
|
|
|
|
{
|
2013-04-24 08:39:26 +02:00
|
|
|
MConf.get().taskEconMillis = delayMillis;
|
2013-04-18 13:36:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void invoke()
|
2012-11-28 06:51:37 +01:00
|
|
|
{
|
2013-04-22 12:26:13 +02:00
|
|
|
for (FactionColl coll : FactionColls.get().getColls())
|
|
|
|
{
|
|
|
|
coll.econLandRewardRoutine();
|
|
|
|
}
|
2012-11-28 06:51:37 +01:00
|
|
|
}
|
2013-04-18 13:36:52 +02:00
|
|
|
|
2012-11-28 06:51:37 +01:00
|
|
|
}
|