mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-29 19:01:22 +01:00
[Bleeding] Set the players fall distance on successful teleports.
Might cause issues.
This commit is contained in:
parent
fed73d519b
commit
5879fba502
@ -725,10 +725,17 @@ public class MovingListener extends CheckListener{
|
||||
if (!event.isCancelled()){
|
||||
// Normal teleport.
|
||||
ref = to;
|
||||
double fallDistance = data.noFallFallDistance;
|
||||
data.clearMorePacketsData();
|
||||
data.clearFlyData();
|
||||
data.resetPositions(to);
|
||||
data.setSetBack(to);
|
||||
// TODO: make this configurable.
|
||||
if (fallDistance - player.getFallDistance() > 0.0){
|
||||
// Reset fall distance.
|
||||
// TODO: This might lead to new compatibility trouble.
|
||||
player.setFallDistance((float) fallDistance);
|
||||
}
|
||||
}
|
||||
else{
|
||||
// Cancelled, not a set back, ignore it, basically.
|
||||
|
Loading…
Reference in New Issue
Block a user