From e0b07bc53c77b64be991a09fbbe1671c621d7ed8 Mon Sep 17 00:00:00 2001 From: Dark Arc Date: Sat, 22 Mar 2014 02:32:54 -0400 Subject: [PATCH] Potential fix for issue #277 Also corrected a typo where fast place was using the count of the fast break check in its output --- .../java/net/gravitydevelopment/anticheat/check/Backend.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/gravitydevelopment/anticheat/check/Backend.java b/src/main/java/net/gravitydevelopment/anticheat/check/Backend.java index 5f20cffd..b237cb85 100644 --- a/src/main/java/net/gravitydevelopment/anticheat/check/Backend.java +++ b/src/main/java/net/gravitydevelopment/anticheat/check/Backend.java @@ -669,7 +669,7 @@ public CheckResult checkFastBreak(Player player, Block block) { } } else { Long math = System.currentTimeMillis() - lastBlockBroken.get(name); - if ((math != 0L && timemax != 0L)) { + if (timemax != 0L) { if (math < timemax) { if (fastBreakViolation.containsKey(name) && fastBreakViolation.get(name) > 0) { fastBreakViolation.put(name, fastBreakViolation.get(name) + 1); @@ -719,7 +719,7 @@ public CheckResult checkFastPlace(Player player) { if (!silentMode()) { player.sendMessage(ChatColor.RED + "[AntiCheat] Fastplacing detected. Please wait 10 seconds before placing blocks."); } - return new CheckResult(CheckResult.Result.FAILED, player.getName() + " placed blocks too fast " + fastBreakViolation.get(name) + " times in a row (max=" + violations + ")"); + return new CheckResult(CheckResult.Result.FAILED, player.getName() + " placed blocks too fast " + fastPlaceViolation.get(name) + " times in a row (max=" + violations + ")"); } else if (lastBlockPlaced.get(name) > 0 && math > magic.FASTPLACE_MAXVIOLATIONTIME()) { AntiCheat.debugLog("Reset facePlaceViolation for " + name); fastPlaceViolation.put(name, 0);