mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-30 20:37:52 +01:00
Fixed loophole that would allow players to bypass NoCheat for one move
when leaving vehicles.
This commit is contained in:
parent
6bdec962b2
commit
c08e8f0edf
@ -3,7 +3,7 @@ name: NoCheat
|
|||||||
author: Evenprime
|
author: Evenprime
|
||||||
|
|
||||||
main: cc.co.evenprime.bukkit.nocheat.NoCheat
|
main: cc.co.evenprime.bukkit.nocheat.NoCheat
|
||||||
version: 1.11a
|
version: 1.11b
|
||||||
|
|
||||||
softdepend: [ Permissions, CraftIRC ]
|
softdepend: [ Permissions, CraftIRC ]
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ public class MovingCheck extends Check {
|
|||||||
*/
|
*/
|
||||||
public boolean shouldBeApplied(final Player player, final MovingData data, final Location from, final Location to) {
|
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) {
|
if(data.wasTeleported) {
|
||||||
// Remember this location
|
// Remember this location
|
||||||
|
@ -24,8 +24,6 @@ public class MovingData {
|
|||||||
public double maxYVelocity = 0.0D;
|
public double maxYVelocity = 0.0D;
|
||||||
public double violationLevel = 0.0D;
|
public double violationLevel = 0.0D;
|
||||||
|
|
||||||
public boolean insideVehicle = false;
|
|
||||||
|
|
||||||
public Location teleportInitializedByMe = null;
|
public Location teleportInitializedByMe = null;
|
||||||
public boolean wasTeleported = true;
|
public boolean wasTeleported = true;
|
||||||
public Location teleportedTo;
|
public Location teleportedTo;
|
||||||
|
@ -60,9 +60,6 @@ public class MovingPlayerMonitor extends PlayerListener {
|
|||||||
if( event.getPlayer().isInsideVehicle()) {
|
if( event.getPlayer().isInsideVehicle()) {
|
||||||
data.setBackPoint = event.getTo();
|
data.setBackPoint = event.getTo();
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
data.insideVehicle = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user