mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-29 03:48:50 +01:00
Fixed a rare exception in moving check if a teleport destination
isn't in the same world as the player.
This commit is contained in:
parent
272f2d410c
commit
9406961f05
@ -3,7 +3,7 @@ name: NoCheat
|
||||
author: Evenprime
|
||||
|
||||
main: cc.co.evenprime.bukkit.nocheat.NoCheat
|
||||
version: 1.07a
|
||||
version: 1.07b
|
||||
|
||||
softdepend: [ Permissions, CraftIRC ]
|
||||
|
||||
|
@ -396,12 +396,15 @@ public class MovingCheck extends Check {
|
||||
// in the move event) tells us if the server is still waiting for the clientside teleporting
|
||||
// to be executed. We are only interested in client's move events after it executed the
|
||||
// teleport, therefore just ignore all events before that.
|
||||
if(data.teleportTo != null && data.teleportTo.distanceSquared(from) < 0.01D) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
data.teleportTo = null;
|
||||
if(data.teleportTo != null && data.teleportTo.getWorld().equals(from.getWorld())) {
|
||||
if(data.teleportTo.distanceSquared(from) < 0.01D) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
data.teleportTo = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Dead or in vehicles -> I don't care
|
||||
if(player.isDead() || data.insideVehicle || player.isInsideVehicle()) {
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user