From 13a4ee6f27a954e70f228336b45c77274a07b636 Mon Sep 17 00:00:00 2001 From: Wruczek Date: Tue, 19 Dec 2023 22:57:58 +0100 Subject: [PATCH] Fix FastBreak alert with no modify permission --- .../java/ac/grim/grimac/checks/impl/misc/FastBreak.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/ac/grim/grimac/checks/impl/misc/FastBreak.java b/src/main/java/ac/grim/grimac/checks/impl/misc/FastBreak.java index 37a49b831f..8c876bcd2a 100644 --- a/src/main/java/ac/grim/grimac/checks/impl/misc/FastBreak.java +++ b/src/main/java/ac/grim/grimac/checks/impl/misc/FastBreak.java @@ -82,10 +82,12 @@ public void onPacketReceive(PacketReceiveEvent event) { blockDelayBalance += 300 - breakDelay; } - if (blockDelayBalance > 1000 && shouldModifyPackets()) { // If more than a second of advantage - event.setCancelled(true); // Cancelling start digging will cause server to reject block break - player.onPacketCancel(); + if (blockDelayBalance > 1000) { // If more than a second of advantage flagAndAlert("Delay=" + breakDelay); + if (shouldModifyPackets()) { + event.setCancelled(true); // Cancelling start digging will cause server to reject block break + player.onPacketCancel(); + } } clampBalance();