Check MoveConsistency for PlayerMoveEvent as well even if in vehicles.

This commit is contained in:
asofold 2013-10-26 23:24:05 +02:00
parent 76eb1c2539
commit 85d925f45d

View File

@ -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;