mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-15 08:28:10 +02:00
Code simplification.
This commit is contained in:
parent
a12ffcf916
commit
dd9e5d3873
@ -577,12 +577,7 @@ public class MovingListener extends CheckListener implements TickListener, IRemo
|
|||||||
}
|
}
|
||||||
// Check NoFall if no reset is done.
|
// Check NoFall if no reset is done.
|
||||||
if (cc.noFallCheck && !NCPExemptionManager.isExempted(player, CheckType.MOVING_NOFALL) && !player.hasPermission(Permissions.MOVING_NOFALL)) {
|
if (cc.noFallCheck && !NCPExemptionManager.isExempted(player, CheckType.MOVING_NOFALL) && !player.hasPermission(Permissions.MOVING_NOFALL)) {
|
||||||
if (passableTo != null){
|
if (newTo == null && passableTo == null){
|
||||||
// Deal damage if necessary.
|
|
||||||
// Leaving out: player.getLocation().getY()
|
|
||||||
if (cc.sfFallDamage) noFall.checkDamage(player, data, Math.min(from.getY(), to.getY()));
|
|
||||||
}
|
|
||||||
else if (newTo == null) {
|
|
||||||
// NOTE: noFall might set yOnGround for the positions.
|
// NOTE: noFall might set yOnGround for the positions.
|
||||||
noFall.check(player, pFrom, pTo, data, cc);
|
noFall.check(player, pFrom, pTo, data, cc);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user