From 5ba7ce4991b6590f4dfa1916347a21f6bad59464 Mon Sep 17 00:00:00 2001 From: Evenprime Date: Sun, 13 Mar 2011 18:17:31 +0100 Subject: [PATCH] Fixed a small bug causing the log message summary to be displayed earlier than I intended. --- plugin.yml | 2 +- .../co/evenprime/bukkit/nocheat/checks/MovingCheck.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugin.yml b/plugin.yml index ca65ed21..8547f705 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.8 +version: 0.6.8a 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 d446bbb2..ec01a85c 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/checks/MovingCheck.java +++ b/src/cc/co/evenprime/bukkit/nocheat/checks/MovingCheck.java @@ -347,7 +347,7 @@ public class MovingCheck { protected static void legitimateMove(NoCheatData data, PlayerMoveEvent event) { // Give some logging about violations if the player hasn't done any for at least two seconds - if(data.movingLastViolationTime != 0 && data.movingLastViolationTime < System.currentTimeMillis() + 2000L) { + if(data.movingLastViolationTime != 0 && data.movingLastViolationTime + 1000L > System.currentTimeMillis()) { data.movingLastViolationTime = 0; @@ -395,9 +395,9 @@ public class MovingCheck { // If we have stored a location for the player, we put him back there if(l != null) { // Lets try it that way. Maybe now people don't "disappear" any longer - event.setFrom(l); - event.setTo(l); - event.getPlayer().teleportTo(l); + event.setFrom(l.clone()); + event.setTo(l.clone()); + event.getPlayer().teleportTo(l.clone()); event.setCancelled(true); } else {