mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-30 20:37:52 +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
|
author: Evenprime
|
||||||
|
|
||||||
main: cc.co.evenprime.bukkit.nocheat.NoCheat
|
main: cc.co.evenprime.bukkit.nocheat.NoCheat
|
||||||
version: 1.07a
|
version: 1.07b
|
||||||
|
|
||||||
softdepend: [ Permissions, CraftIRC ]
|
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
|
// 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
|
// to be executed. We are only interested in client's move events after it executed the
|
||||||
// teleport, therefore just ignore all events before that.
|
// teleport, therefore just ignore all events before that.
|
||||||
if(data.teleportTo != null && data.teleportTo.distanceSquared(from) < 0.01D) {
|
if(data.teleportTo != null && data.teleportTo.getWorld().equals(from.getWorld())) {
|
||||||
return true;
|
if(data.teleportTo.distanceSquared(from) < 0.01D) {
|
||||||
}
|
return true;
|
||||||
else {
|
}
|
||||||
data.teleportTo = null;
|
else {
|
||||||
|
data.teleportTo = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dead or in vehicles -> I don't care
|
// Dead or in vehicles -> I don't care
|
||||||
if(player.isDead() || data.insideVehicle || player.isInsideVehicle()) {
|
if(player.isDead() || data.insideVehicle || player.isInsideVehicle()) {
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user