diff --git a/plugin.yml b/plugin.yml index 9eec5407..2cb0ffcd 100644 --- a/plugin.yml +++ b/plugin.yml @@ -3,7 +3,7 @@ name: NoCheat author: Evenprime main: cc.co.evenprime.bukkit.nocheat.NoCheat -version: 0.9.5 +version: 0.9.6 commands: nocheat: diff --git a/src/cc/co/evenprime/bukkit/nocheat/checks/MovingCheck.java b/src/cc/co/evenprime/bukkit/nocheat/checks/MovingCheck.java index 88bf9f1d..c0789ca1 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/checks/MovingCheck.java +++ b/src/cc/co/evenprime/bukkit/nocheat/checks/MovingCheck.java @@ -322,10 +322,11 @@ public class MovingCheck extends Check { final double z = from.getZ(); final Location l = data.lastLocation; - if(x == to.getX() && z == to.getZ() && y == to.getY() ) + if(x == to.getX() && z == to.getZ() && y == to.getY() ) { return true; + } // Something or someone moved the player without causing a move event - Can't do much with that - if(!(x == l.getX() && z == l.getZ() && y == l.getY())){ + else if(!(x == l.getX() && z == l.getZ() && y == l.getY())){ resetData(data, to); return true; } diff --git a/src/cc/co/evenprime/bukkit/nocheat/listeners/MovingPlayerMonitor.java b/src/cc/co/evenprime/bukkit/nocheat/listeners/MovingPlayerMonitor.java index ca0b85a1..219420fa 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/listeners/MovingPlayerMonitor.java +++ b/src/cc/co/evenprime/bukkit/nocheat/listeners/MovingPlayerMonitor.java @@ -39,8 +39,11 @@ public class MovingPlayerMonitor extends PlayerListener { @Override public void onPlayerMove(PlayerMoveEvent event) { - MovingData data = MovingData.get(event.getPlayer()); - data.lastLocation = event.getTo(); - check.updateVelocity(event.getPlayer().getVelocity(), data); + if(!event.getPlayer().isInsideVehicle()) { + MovingData data = MovingData.get(event.getPlayer()); + data.lastLocation = event.getTo(); + + check.updateVelocity(event.getPlayer().getVelocity(), data); + } } }