diff --git a/CompatNoCheatPlus/src/me/asofold/bpl/cncp/hooks/mcmmo/HookFacadeImpl.java b/CompatNoCheatPlus/src/me/asofold/bpl/cncp/hooks/mcmmo/HookFacadeImpl.java index fc7c4ba..67da92b 100644 --- a/CompatNoCheatPlus/src/me/asofold/bpl/cncp/hooks/mcmmo/HookFacadeImpl.java +++ b/CompatNoCheatPlus/src/me/asofold/bpl/cncp/hooks/mcmmo/HookFacadeImpl.java @@ -212,11 +212,16 @@ public class HookFacadeImpl implements HookFacade, NCPHook { protected void cleanupLastBreaks() { final long ts = System.currentTimeMillis(); - if (ts - lastBreakCleanup < 30000) return; + if (ts - lastBreakCleanup < 30000 && ts > lastBreakCleanup) return; lastBreakCleanup = ts; final List rem = new LinkedList(); - for (final Entry entry : lastBreak.entrySet()){ - if (entry.getValue().score(1f) == 0f) rem.add(entry.getKey()); + if (ts >= lastBreakCleanup){ + for (final Entry entry : lastBreak.entrySet()){ + if (entry.getValue().score(1f) == 0f) rem.add(entry.getKey()); + } + } + else{ + rem.addAll(lastBreak.keySet()); } for (final String key :rem){ lastBreak.remove(key);