diff --git a/src/fr/neatmonster/nocheatplus/utilities/TickTask.java b/src/fr/neatmonster/nocheatplus/utilities/TickTask.java index 9844f0f1..93da26eb 100644 --- a/src/fr/neatmonster/nocheatplus/utilities/TickTask.java +++ b/src/fr/neatmonster/nocheatplus/utilities/TickTask.java @@ -49,7 +49,7 @@ public class TickTask implements Runnable { private static final Set permissionUpdates = new LinkedHashSet(50); /** Actions to execute. */ - public static final List delayedActions = new LinkedList(); + private static final List delayedActions = new LinkedList(); /** Task id of the running TickTask */ protected static int taskId = -1; @@ -216,13 +216,20 @@ public class TickTask implements Runnable { public void run() { tick ++; final long time = System.currentTimeMillis(); - // The isEmpty checks are faster than synchronizing fully always, the actions get delayed one tick at most. + + // Now sync is forced, for the ability to lock. executeActions(); updatePermissions(); + + // Time running backwards check (not only players can!). if (timeLast > time) { LogUtil.logSevere("[NoCheatPlus] System time ran backwards (" + timeLast + "->" + time + "), clear all data and history..."); DataManager.clearData(CheckType.ALL); } + + // TODO: Lag measurement ! + + // Finish. timeLast = time; }