diff --git a/plugin.yml b/plugin.yml index 93c70826..21fce324 100644 --- a/plugin.yml +++ b/plugin.yml @@ -3,7 +3,7 @@ name: NoCheatPlugin author: Evenprime main: cc.co.evenprime.bukkit.nocheat.NoCheatPlugin -version: 0.6.6a +version: 0.6.7 commands: nocheat: diff --git a/src/cc/co/evenprime/bukkit/nocheat/checks/MovingCheck.java b/src/cc/co/evenprime/bukkit/nocheat/checks/MovingCheck.java index 814c4f5a..e307f701 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/checks/MovingCheck.java +++ b/src/cc/co/evenprime/bukkit/nocheat/checks/MovingCheck.java @@ -392,12 +392,13 @@ public class MovingCheck { // to lost vertical momentum to prevent him from getting stuck data.movingJumpPhase = 0; + Location l = data.movingSetBackPoint; // If we have stored a location for the player, we put him back there - if(data.movingSetBackPoint != null) { + if(l != null) { // Lets try it that way. Maybe now people don't "disappear" any longer - event.setFrom(data.movingSetBackPoint); - event.setTo(data.movingSetBackPoint); - event.getPlayer().teleportTo(data.movingSetBackPoint); + event.setFrom(l); + event.setTo(l); + event.getPlayer().teleportTo(l); } else { // Lets try it that way. Maybe now people don't "disappear" any longer diff --git a/src/cc/co/evenprime/bukkit/nocheat/checks/SpeedhackCheck.java b/src/cc/co/evenprime/bukkit/nocheat/checks/SpeedhackCheck.java index f73ddf9e..7b951e6a 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/checks/SpeedhackCheck.java +++ b/src/cc/co/evenprime/bukkit/nocheat/checks/SpeedhackCheck.java @@ -1,5 +1,6 @@ package cc.co.evenprime.bukkit.nocheat.checks; +import org.bukkit.Location; import org.bukkit.event.player.PlayerMoveEvent; import cc.co.evenprime.bukkit.nocheat.NoCheatConfiguration; @@ -85,13 +86,14 @@ public class SpeedhackCheck { private static void resetPlayer(PlayerMoveEvent event, NoCheatData data) { + Location l = data.speedhackSetBackPoint; // If we have stored a location for the player, we put him back there - if(data.speedhackSetBackPoint != null) { + if(l != null) { // Lets try it that way. Maybe now people don't "disappear" any longer - event.setFrom(data.speedhackSetBackPoint); - event.setTo(data.speedhackSetBackPoint); - event.getPlayer().teleportTo(data.speedhackSetBackPoint); + event.setFrom(l); + event.setTo(l); + event.getPlayer().teleportTo(l); } else { // Lets try it that way. Maybe now people don't "disappear" any longer