mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Fix WaterWalk false positive
This commit is contained in:
1 parent
97534e5df0
commit
16c778c17f
2 files changed
+8
-2
No files matched your search
@@ -44,12 +44,11 @@ public class WaterWalkCheck {
|
||||
MovementManager movementManager = user.getMovementManager();
|
||||
|
||||
if (movementManager.distanceXZ <= 0 || player.getVehicle() != null || Utilities.isOnLilyPad(player)
|
||||
|| VersionUtil.isRiptiding(player))
|
||||
|| VersionUtil.isRiptiding(player) || VersionUtil.isSwimming(player))
|
||||
return PASS;
|
||||
|
||||
Checks checksConfig = AntiCheatReloaded.getManager().getConfiguration().getChecks();
|
||||
Block blockBeneath = player.getLocation().clone().subtract(0, 0.1, 0).getBlock();
|
||||
|
||||
if (checksConfig.isSubcheckEnabled(CheckType.WATER_WALK, "walk") && blockBeneath.isLiquid()
|
||||
&& Utilities.isSurroundedByWater(player)
|
||||
&& ((movementManager.motionY == 0 && movementManager.lastMotionY == 0)
|
||||
|
||||
@@ -147,4 +147,11 @@ public class VersionUtil {
|
||||
return player.getPotionEffect(type).getAmplifier() + 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static boolean isSwimming(Player player) {
|
||||
if (isBountifulUpdate()) {
|
||||
return false;
|
||||
}
|
||||
return player.isSwimming();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user