diff --git a/src/cc/co/evenprime/bukkit/nocheat/NoCheat.java b/src/cc/co/evenprime/bukkit/nocheat/NoCheat.java index a4e1a404..00f8b1be 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/NoCheat.java +++ b/src/cc/co/evenprime/bukkit/nocheat/NoCheat.java @@ -107,7 +107,7 @@ public class NoCheat extends JavaPlugin implements CommandSender { return true; } } - + return false; } @@ -167,7 +167,7 @@ public class NoCheat extends JavaPlugin implements CommandSender { try { cleanUpTaskId = Bukkit.getServer().getScheduler().scheduleAsyncRepeatingTask(this, new Runnable() { - + @Override public void run() { NoCheatData.cleanPlayerDataCollection(); @@ -385,7 +385,7 @@ public class NoCheat extends JavaPlugin implements CommandSender { s = s + (!movingCheck.isActive() || movingCheck.allowFlying ? "flying* " : (hasPermission(p, PermissionData.PERMISSION_FLYING, movingCheck.checkOPs) ? "flying " : "")); s = s + (!movingCheck.isActive() || movingCheck.allowFakeSneak ? "fakesneak* " : (hasPermission(p, PermissionData.PERMISSION_FAKESNEAK, movingCheck.checkOPs) ? "fakesneak " : "")); s = s + (!movingCheck.isActive() || movingCheck.allowFastSwim ? "fastswim* " : (hasPermission(p, PermissionData.PERMISSION_FASTSWIM, movingCheck.checkOPs) ? "fastswim " : "")); - + s = s + (hasPermission(p, PermissionData.PERMISSION_NOTIFY, false) ? "notify " : ""); return s; @@ -406,8 +406,6 @@ public class NoCheat extends JavaPlugin implements CommandSender { } - - @Override public void sendMessage(String message) { // we don't receive messages diff --git a/src/cc/co/evenprime/bukkit/nocheat/checks/MovingCheck.java b/src/cc/co/evenprime/bukkit/nocheat/checks/MovingCheck.java index eda8ee9c..9bb9a5d8 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/checks/MovingCheck.java +++ b/src/cc/co/evenprime/bukkit/nocheat/checks/MovingCheck.java @@ -384,7 +384,7 @@ public class MovingCheck extends Check { private boolean shouldBeIgnored(final Player player, final MovingData data, final Location from, final Location to) { // First the simple yes/no checks - if(data.respawned || data.insideVehicle || player.isInsideVehicle() || data.worldChanged) { + if(/*data.respawned ||*/ data.insideVehicle || player.isInsideVehicle()) { return true; } @@ -453,9 +453,7 @@ public class MovingCheck extends Check { public void teleported(PlayerTeleportEvent event) { MovingData data = MovingData.get(event.getPlayer()); - - if(data.respawned) data.respawned = false; - + // We can enforce a teleport, if that flag is explicitly set if(event.isCancelled() && enforceTeleport && event.getTo().equals(data.teleportTo)) { event.setCancelled(false); @@ -465,8 +463,6 @@ public class MovingCheck extends Check { data.lastLocation = event.getTo(); data.jumpPhase = 0; data.setBackPoint = event.getTo(); - - data.worldChanged = !event.getFrom().getWorld().getName().equals(event.getTo().getWorld().getName()); } } @@ -476,8 +472,7 @@ public class MovingCheck extends Check { */ public void respawned(PlayerRespawnEvent event) { MovingData data = MovingData.get(event.getPlayer()); - data.respawned = true; - + data.lastLocation = event.getRespawnLocation(); // We expect the player to be there next } /** diff --git a/src/cc/co/evenprime/bukkit/nocheat/data/MovingData.java b/src/cc/co/evenprime/bukkit/nocheat/data/MovingData.java index 2655849b..9362dae7 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/data/MovingData.java +++ b/src/cc/co/evenprime/bukkit/nocheat/data/MovingData.java @@ -29,8 +29,6 @@ public class MovingData { public double sneakingLastDistance = 0.0D; public double swimmingLastDistance = 0.0D; - public boolean worldChanged = false; - public boolean respawned = false; public boolean insideVehicle = false; // WORKAROUND for changed PLAYER_MOVE logic diff --git a/src/cc/co/evenprime/bukkit/nocheat/listeners/MovingEntityListener.java b/src/cc/co/evenprime/bukkit/nocheat/listeners/MovingEntityListener.java index 8e4699d4..a47ad626 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/listeners/MovingEntityListener.java +++ b/src/cc/co/evenprime/bukkit/nocheat/listeners/MovingEntityListener.java @@ -20,6 +20,5 @@ public class MovingEntityListener extends EntityListener { if(event.getEntity() instanceof Player) { check.updateVelocity(event.getEntity().getVelocity(), MovingData.get((Player)event.getEntity())); } - } }