Fix antifastbreak for newer clients which dont send start digigng packets on reinforced blocks

This commit is contained in:
Maxopoly committed 2020-11-15 19:00:08 +01:00
1 parent a4fa1ef776
commit 49d8e8b65f
1 file changed
+3 -1
@@ -151,10 +151,12 @@ public class AntiFastBreak extends BasicHack {
}
long msToBreak = ticksToBreak * 50L;
long timePassed = System.currentTimeMillis() - timeStarted;
long now = System.currentTimeMillis();
long timePassed = now - timeStarted;
if (debug) {
plugin().getLogger().info("Measured " + timePassed + " for allowed time of " + msToBreak);
}
miningLocs.put(loc, now);
if (timePassed * laggLenciency < msToBreak) {
punish(player);
} else {