diff --git a/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java b/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java index 453941f..cc12e4f 100644 --- a/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java +++ b/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java @@ -49,14 +49,14 @@ public class MovementListener implements Listener { Location to = event.getTo(); Location from = event.getFrom(); - if (to.getX() != from.getX() || to.getZ() != from.getZ()) { - if (game.getGameState() == GameState.STARTING) { + if (game.getGameState() == GameState.STARTING) { + if (to.getX() != from.getX() || to.getZ() != from.getZ()) { player.teleport(from); return; } } - if (playerData.getPlayerState() != PlayerState.RESPAWNING && game.getGameState() != GameState.ENDING) { + if (game.getGameState() != GameState.ENDING) { if (player.getLocation().getY() <= game.getArena().getDeadZone()) { Player killer = playerData.getLastDamager(); if (killer != null) { diff --git a/src/main/java/rip/tilly/bedwars/runnables/RespawnRunnable.java b/src/main/java/rip/tilly/bedwars/runnables/RespawnRunnable.java index ef49f70..f4a0691 100644 --- a/src/main/java/rip/tilly/bedwars/runnables/RespawnRunnable.java +++ b/src/main/java/rip/tilly/bedwars/runnables/RespawnRunnable.java @@ -31,7 +31,7 @@ public class RespawnRunnable extends BukkitRunnable { cancel(); return; } - if (this.playerData.getPlayerState() != PlayerState.RESPAWNING || this.playerData.getPlayerState() != PlayerState.PLAYING) { + if (this.playerData.getPlayerState() == PlayerState.SPAWN) { cancel(); return; }