From 85d925f45df8057fe38cb88f395d24b29445354a Mon Sep 17 00:00:00 2001 From: asofold Date: Sat, 26 Oct 2013 23:24:05 +0200 Subject: [PATCH] Check MoveConsistency for PlayerMoveEvent as well even if in vehicles. --- .../nocheatplus/checks/moving/MovingListener.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java index 7f694c75..ed05cdcb 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java @@ -416,6 +416,8 @@ public class MovingListener extends CheckListener implements TickListener, IRemo final MovingData data = MovingData.getData(player); + // TODO: Check illegal moves here anyway (!). + // Ignore players in vehicles. if (player.isInsideVehicle()){ // Workaround for pigs and other (1.5.x and before)! @@ -431,6 +433,9 @@ public class MovingListener extends CheckListener implements TickListener, IRemo // (Auto detection of missing events, might fire one time too many per plugin run.) if (!normalVehicles.contains(vehicle.getType())) { onVehicleMove(vehicle, vLoc, vLoc, true); + } else { + data.vehicleConsistency = MoveConsistency.getConsistency(event.getFrom(), event.getTo(), vLoc); + // TODO: Consider TeleportUtil.forceMount or similar. } } return;