Require from to be on the ground before we slow movement speed for sneaking or blocking

This commit is contained in:
Iceee 2015-04-19 15:29:22 -05:00
parent 7ae63211c2
commit 805fafbe4e

View File

@ -562,10 +562,10 @@ public class SurvivalFly extends Check {
hAllowedDistance *= modSprint;
}
}
} else if (!sfDirty && player.isSneaking() && reallySneaking.contains(player.getName()) && (!checkPermissions || !player.hasPermission(Permissions.MOVING_SURVIVALFLY_SNEAKING))) {
} else if (!sfDirty && from.isOnGround() && player.isSneaking() && reallySneaking.contains(player.getName()) && (!checkPermissions || !player.hasPermission(Permissions.MOVING_SURVIVALFLY_SNEAKING))) {
hAllowedDistance = modSneak * walkSpeed * cc.survivalFlySneakingSpeed / 100D;
}
else if (!sfDirty && player.isBlocking() && (!checkPermissions || !player.hasPermission(Permissions.MOVING_SURVIVALFLY_BLOCKING))) {
else if (!sfDirty && from.isOnGround() && player.isBlocking() && (!checkPermissions || !player.hasPermission(Permissions.MOVING_SURVIVALFLY_BLOCKING))) {
hAllowedDistance = modBlock * walkSpeed * cc.survivalFlyBlockingSpeed / 100D;
}
else {