Invalidate currently processed move, if a teleport happened.

Should only be possible to happen, if an actions entry doesn't use 'ncp
delay ...' for teleporting, or if a hook teleports the player (both
discouraged).
This commit is contained in:
asofold 2015-12-16 18:39:36 +01:00
parent 16a1e08f57
commit 3cfa6cfb06

View File

@ -750,7 +750,14 @@ public class MovingListener extends CheckListener implements TickListener, IRemo
processBounce(player, pFrom.getY(), pTo.getY(), data, cc);
}
// Finished move processing.
data.finishThisMove();
if (processingEvents.containsKey(playerName)) {
// Normal processing.
// TODO: More simple: UUID keys or a data flag instead?
data.finishThisMove();
} else {
// Teleport during violation processing, just invalidate thisMove.
data.thisMove.invalidate();
}
return false;
}
else {