diff --git a/src/cc/co/evenprime/bukkit/nocheat/checks/moving/MovingCheckListener.java b/src/cc/co/evenprime/bukkit/nocheat/checks/moving/MovingCheckListener.java index 8fdc1a94..e82f2ff6 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/checks/moving/MovingCheckListener.java +++ b/src/cc/co/evenprime/bukkit/nocheat/checks/moving/MovingCheckListener.java @@ -9,6 +9,7 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.event.player.PlayerChangedWorldEvent; import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.player.PlayerPortalEvent; import org.bukkit.event.player.PlayerRespawnEvent; @@ -80,7 +81,7 @@ public class MovingCheckListener implements Listener, EventManager { @EventHandler(priority = EventPriority.HIGHEST) public void teleport(final PlayerTeleportEvent event) { - + NoCheatPlayer player = plugin.getPlayer(event.getPlayer()); final MovingData data = MovingCheck.getData(player.getDataStore()); @@ -99,6 +100,14 @@ public class MovingCheckListener implements Listener, EventManager { return; } + @EventHandler(priority = EventPriority.MONITOR) + public void worldChange(final PlayerChangedWorldEvent event) { + final MovingData data = MovingCheck.getData(plugin.getPlayer(event.getPlayer()).getDataStore()); + data.teleportTo.reset(); + data.clearRunFlyData(); + data.clearMorePacketsData(); + } + @EventHandler(priority = EventPriority.MONITOR) public void portal(final PlayerPortalEvent event) { final MovingData data = MovingCheck.getData(plugin.getPlayer(event.getPlayer()).getDataStore());