mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-07 11:10:05 +01:00
Only count in depth strider with water.
This commit is contained in:
parent
eef50d0b33
commit
5d4c71eaae
@ -606,6 +606,7 @@ public class SurvivalFly extends Check {
|
||||
// TODO: Test how to go with only checking from (less dolphins).
|
||||
// TODO: Sneaking and blocking applies to when in water !
|
||||
hAllowedDistance = modSwim * walkSpeed * cc.survivalFlySwimmingSpeed / 100D;
|
||||
if (from.isInWater() || !from.isInLava()) { // (We don't really have other liquids, though.)
|
||||
final int level = BridgeEnchant.getDepthStriderLevel(player);
|
||||
if (level > 0) {
|
||||
// The hard way.
|
||||
@ -613,6 +614,7 @@ public class SurvivalFly extends Check {
|
||||
// Modifiers: Most speed seems to be reached on ground, but couldn't nail down.
|
||||
useBaseModifiers = true;
|
||||
}
|
||||
}
|
||||
// (Friction is used as is.)
|
||||
}
|
||||
else if (!sfDirty && from.isOnGround() && player.isSneaking() && reallySneaking.contains(player.getName()) && (!checkPermissions || !player.hasPermission(Permissions.MOVING_SURVIVALFLY_SNEAKING))) {
|
||||
|
Loading…
Reference in New Issue
Block a user