Fix indentation style and note invalid approach in EconLandRewardTask.

This commit is contained in:
Olof Larsson 2013-04-10 09:47:32 +02:00
parent d2e261a275
commit 3ef3492c68

View File

@ -4,8 +4,8 @@ import com.massivecraft.factions.ConfServer;
import com.massivecraft.factions.FactionColl; import com.massivecraft.factions.FactionColl;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
public class EconLandRewardTask implements Runnable { public class EconLandRewardTask implements Runnable
{
double rate; double rate;
public EconLandRewardTask() public EconLandRewardTask()
@ -17,9 +17,15 @@ public class EconLandRewardTask implements Runnable {
public void run() public void run()
{ {
FactionColl.i.econLandRewardRoutine(); FactionColl.i.econLandRewardRoutine();
// TODO: This technique is TPS dependent and wrong.
// Instead of restarting a TPS dependent task the task should poll every once in a while for the system millis.
// With such a setup the need for restarts are gone.
// maybe setting has been changed? if so, restart task at new rate // maybe setting has been changed? if so, restart task at new rate
if (this.rate != ConfServer.econLandRewardTaskRunsEveryXMinutes) if (this.rate != ConfServer.econLandRewardTaskRunsEveryXMinutes)
{
Factions.get().startEconLandRewardTask(true); Factions.get().startEconLandRewardTask(true);
}
} }
} }