mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-02-16 03:31:37 +01:00
Shuffle checks in fight listener
This commit is contained in:
parent
7c77764697
commit
6f232e5dde
@ -195,22 +195,24 @@ public class FightListener extends CheckListener implements JoinLeaveListener{
|
|||||||
|
|
||||||
if (!cancelled && critical.isEnabled(player) && critical.check(player))
|
if (!cancelled && critical.isEnabled(player) && critical.check(player))
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
|
|
||||||
if (!cancelled && direction.isEnabled(player) && direction.check(player, damaged))
|
|
||||||
cancelled = true;
|
|
||||||
|
|
||||||
if (!cancelled && knockback.isEnabled(player) && knockback.check(player))
|
if (!cancelled && knockback.isEnabled(player) && knockback.check(player))
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
|
|
||||||
if (!cancelled && noSwing.isEnabled(player) && noSwing.check(player))
|
if (!cancelled && noSwing.isEnabled(player) && noSwing.check(player))
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
|
|
||||||
if (!cancelled && reach.isEnabled(player) && reach.check(player, damaged))
|
|
||||||
cancelled = true;
|
|
||||||
|
|
||||||
if (!cancelled && player.isBlocking() && !player.hasPermission(Permissions.MOVING_SURVIVALFLY_BLOCKING))
|
if (!cancelled && player.isBlocking() && !player.hasPermission(Permissions.MOVING_SURVIVALFLY_BLOCKING))
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
|
|
||||||
|
// TODO: Order of the last two [might put first] ?
|
||||||
|
|
||||||
|
if (!cancelled && reach.isEnabled(player) && reach.check(player, damaged))
|
||||||
|
cancelled = true;
|
||||||
|
|
||||||
|
if (!cancelled && direction.isEnabled(player) && direction.check(player, damaged))
|
||||||
|
cancelled = true;
|
||||||
|
|
||||||
// Set values.
|
// Set values.
|
||||||
data.lastWorld = worldName;
|
data.lastWorld = worldName;
|
||||||
data.lastAttackTick = tick;
|
data.lastAttackTick = tick;
|
||||||
|
Loading…
Reference in New Issue
Block a user