From 3ef3492c688a716e0985f1930218445ca018244c Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Wed, 10 Apr 2013 09:47:32 +0200 Subject: [PATCH] Fix indentation style and note invalid approach in EconLandRewardTask. --- .../factions/util/EconLandRewardTask.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/com/massivecraft/factions/util/EconLandRewardTask.java b/src/com/massivecraft/factions/util/EconLandRewardTask.java index 365c6de8..d18813cd 100644 --- a/src/com/massivecraft/factions/util/EconLandRewardTask.java +++ b/src/com/massivecraft/factions/util/EconLandRewardTask.java @@ -4,8 +4,8 @@ import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.FactionColl; import com.massivecraft.factions.Factions; -public class EconLandRewardTask implements Runnable { - +public class EconLandRewardTask implements Runnable +{ double rate; public EconLandRewardTask() @@ -17,9 +17,15 @@ public class EconLandRewardTask implements Runnable { public void run() { 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 if (this.rate != ConfServer.econLandRewardTaskRunsEveryXMinutes) + { Factions.get().startEconLandRewardTask(true); + } } - }