diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java index 07d64844..e995f951 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java @@ -167,7 +167,7 @@ public class MovingData extends ACheckData { public void onSetBack(final Location setBack) { // Reset positions resetPositions(teleported); - // NOTE: Do mind that the reference is used diredctly for set-backs, should stay consistent, though. + // NOTE: Do mind that the reference is used directly for set-backs, should stay consistent, though. this.setBack = this.morePacketsSetback = this.morePacketsVehicleSetback = teleported; clearAccounting(); // Might be more safe to do this. // Keep no-fall data. diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java index d46914d6..3c841acc 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java @@ -622,6 +622,7 @@ public class MovingListener extends CheckListener{ data.clearFlyData(); data.clearMorePacketsData(); data.setBack = event.getRespawnLocation(); + // TODO: consider data.resetPositions(data.setBack); } /** @@ -849,6 +850,7 @@ public class MovingListener extends CheckListener{ final Player player = event.getPlayer(); final MovingData data = MovingData.getData(player); // TODO: on existing set back: detect world changes and loss of world on join (+ set up some paradigm). + data.clearMorePacketsData(); if (data.setBack == null){ data.setBack = player.getLocation(); } diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Passable.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Passable.java index 70de42d8..b2a27abf 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Passable.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Passable.java @@ -61,7 +61,7 @@ public class Passable extends Check { } // Prefer the set-back location from the data. - if (data.setBack != null && BlockProperties.isPassable(from.getBlockCache(), data.setBack)) loc = data.setBack; + if (data.setBack != null && BlockProperties.isPassable(from.getBlockCache(), data.setBack)) loc = data.setBack.clone(); // TODO: set data.set-back ? or something: still some aji here. diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java index 0c6d97ba..fcea29b7 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java @@ -624,12 +624,10 @@ public class SurvivalFly extends Check { } else data.sfCobwebVL += vDistanceAboveLimit * 100D; if (data.sfCobwebVL < 550) { // Totally random ! // Silently set back. - if (data.setBack == null) data.setBack = player.getLocation(); + if (data.setBack == null) data.setSetBack(player.getLocation()); data.sfJumpPhase = 0; - data.setBack.setYaw(to.getYaw()); - data.setBack.setPitch(to.getPitch()); data.sfLastYDist = Double.MAX_VALUE; - return data.setBack.clone(); + return data.getSetBack(to); } else return null; }