mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-06-26 06:14:42 +02:00
Food level is ignored for sprinting with getAllowFlight returning true.
This commit is contained in:
parent
e543d905dd
commit
637f94f579
|
@ -540,7 +540,8 @@ public class MovingListener extends CheckListener implements TickListener, IRemo
|
|||
final long time = System.currentTimeMillis();
|
||||
if (player.isSprinting() || cc.assumeSprint) {
|
||||
// Hard to confine assumesprint further (some logics change with hdist or sprinting).
|
||||
if (player.getFoodLevel() > 5 || player.isFlying()) {
|
||||
// TODO: Collect all these properties within a context object (abstraction + avoid re-fetching).
|
||||
if (player.getFoodLevel() > 5 || player.getAllowFlight() || player.isFlying()) {
|
||||
data.timeSprinting = time;
|
||||
data.multSprinting = attributeAccess.getSprintAttributeMultiplier(player);
|
||||
if (data.multSprinting == Double.MAX_VALUE) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user