Fixed loophole that would allow players to bypass NoCheat for one move

when leaving vehicles.
This commit is contained in:
Evenprime 2011-07-26 19:43:21 +02:00
parent 6bdec962b2
commit c08e8f0edf
4 changed files with 2 additions and 7 deletions

View File

@ -3,7 +3,7 @@ name: NoCheat
author: Evenprime
main: cc.co.evenprime.bukkit.nocheat.NoCheat
version: 1.11a
version: 1.11b
softdepend: [ Permissions, CraftIRC ]

View File

@ -183,7 +183,7 @@ public class MovingCheck extends Check {
*/
public boolean shouldBeApplied(final Player player, final MovingData data, final Location from, final Location to) {
if(player.isDead() || player.isInsideVehicle() || data.insideVehicle) return false;
if(player.isDead() || player.isInsideVehicle()) return false;
if(data.wasTeleported) {
// Remember this location

View File

@ -24,8 +24,6 @@ public class MovingData {
public double maxYVelocity = 0.0D;
public double violationLevel = 0.0D;
public boolean insideVehicle = false;
public Location teleportInitializedByMe = null;
public boolean wasTeleported = true;
public Location teleportedTo;

View File

@ -60,9 +60,6 @@ public class MovingPlayerMonitor extends PlayerListener {
if( event.getPlayer().isInsideVehicle()) {
data.setBackPoint = event.getTo();
}
else {
data.insideVehicle = false;
}
}
}
}