Fixed issue with config reloading and false positives

This commit is contained in:
Rammelkast committed 2020-07-22 11:16:01 +02:00
1 parent 6966582e4c
commit f4ca2ea8bf
5 files changed
+21 -10

No files matched your search

@@ -50,14 +50,14 @@ public class WaterWalkCheck {
if (checksConfig.isSubcheckEnabled(CheckType.WATER_WALK, "walk") && blockBeneath.isLiquid()
&& Utilities.isSurroundedByWater(player)
&& (movementManager.motionY == 0 || movementManager.motionY == Utilities.JUMP_MOTION_Y)
&& movementManager.distanceXZ > checksConfig.getDouble(CheckType.WATER_WALK, "lunge", "minimumDistXZ"))
&& ((movementManager.motionY == 0 && movementManager.lastMotionY == 0) || movementManager.motionY == Utilities.JUMP_MOTION_Y)
&& movementManager.distanceXZ > checksConfig.getDouble(CheckType.WATER_WALK, "walk", "minimumDistXZ"))
return new CheckResult(Result.FAILED,
"tried to walk on water (xz=" + Utilities.roundDouble(movementManager.distanceXZ, 5) + ")");
if (checksConfig.isSubcheckEnabled(CheckType.WATER_WALK, "hop") && blockBeneath.isLiquid()
&& Utilities.isSurroundedByWater(player) && movementManager.onGround
&& Math.abs(movementManager.motionY) < checksConfig.getDouble(CheckType.WATER_WALK, "lunge", "maxMotionY"))
&& Math.abs(movementManager.motionY) < checksConfig.getDouble(CheckType.WATER_WALK, "hop", "maxMotionY"))
return new CheckResult(Result.FAILED,
"tried to hop on water (mY=" + Utilities.roundDouble(movementManager.motionY, 5) + ")");