Moved the last stuff away from ConfServer.
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
package com.massivecraft.factions.task;
|
||||
|
||||
import com.massivecraft.factions.ConfServer;
|
||||
import com.massivecraft.factions.entity.FactionColl;
|
||||
import com.massivecraft.factions.entity.FactionColls;
|
||||
import com.massivecraft.factions.entity.MConf;
|
||||
import com.massivecraft.mcore.ModuloRepeatTask;
|
||||
import com.massivecraft.mcore.util.TimeUnit;
|
||||
|
||||
public class EconRewardTask extends ModuloRepeatTask
|
||||
{
|
||||
@@ -22,13 +21,13 @@ public class EconRewardTask extends ModuloRepeatTask
|
||||
@Override
|
||||
public long getDelayMillis()
|
||||
{
|
||||
return (long) (ConfServer.econLandRewardTaskRunsEveryXMinutes * TimeUnit.MILLIS_PER_MINUTE);
|
||||
return MConf.get().taskEconMillis;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDelayMillis(long delayMillis)
|
||||
{
|
||||
throw new RuntimeException("operation not supported");
|
||||
MConf.get().taskEconMillis = delayMillis;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -26,13 +26,13 @@ public class PowerUpdateTask extends ModuloRepeatTask
|
||||
@Override
|
||||
public long getDelayMillis()
|
||||
{
|
||||
return MConf.get().powerTaskMillis;
|
||||
return MConf.get().taskPowerMillis;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDelayMillis(long delayMillis)
|
||||
{
|
||||
MConf.get().powerTaskMillis = delayMillis;
|
||||
MConf.get().taskPowerMillis = delayMillis;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -1,19 +1,18 @@
|
||||
package com.massivecraft.factions.task;
|
||||
|
||||
import com.massivecraft.factions.ConfServer;
|
||||
import com.massivecraft.factions.entity.MConf;
|
||||
import com.massivecraft.factions.entity.UPlayerColl;
|
||||
import com.massivecraft.factions.entity.UPlayerColls;
|
||||
import com.massivecraft.mcore.ModuloRepeatTask;
|
||||
import com.massivecraft.mcore.util.TimeUnit;
|
||||
|
||||
public class AutoLeaveTask extends ModuloRepeatTask
|
||||
public class RemovePlayerDataTask extends ModuloRepeatTask
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static AutoLeaveTask i = new AutoLeaveTask();
|
||||
public static AutoLeaveTask get() { return i; }
|
||||
private static RemovePlayerDataTask i = new RemovePlayerDataTask();
|
||||
public static RemovePlayerDataTask get() { return i; }
|
||||
|
||||
// -------------------------------------------- //
|
||||
// OVERRIDE: MODULO REPEAT TASK
|
||||
@@ -22,13 +21,13 @@ public class AutoLeaveTask extends ModuloRepeatTask
|
||||
@Override
|
||||
public long getDelayMillis()
|
||||
{
|
||||
return (long) (ConfServer.autoLeaveRoutineRunsEveryXMinutes * TimeUnit.MILLIS_PER_MINUTE);
|
||||
return MConf.get().taskAutoLeaveMillis;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDelayMillis(long delayMillis)
|
||||
{
|
||||
throw new RuntimeException("operation not supported");
|
||||
MConf.get().taskAutoLeaveMillis = delayMillis;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -36,7 +35,7 @@ public class AutoLeaveTask extends ModuloRepeatTask
|
||||
{
|
||||
for (UPlayerColl coll : UPlayerColls.get().getColls())
|
||||
{
|
||||
coll.autoLeaveOnInactivityRoutine();
|
||||
coll.removePlayerDataAfterInactiveDaysRoutine();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user