Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential fix for issue #277 #281

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down