diff --git a/src/main/java/com/thekingelessar/assault/game/eventhandlers/playermovement/PlayerMoveHandler.java b/src/main/java/com/thekingelessar/assault/game/eventhandlers/playermovement/PlayerMoveHandler.java index 400a45a..240bdf2 100644 --- a/src/main/java/com/thekingelessar/assault/game/eventhandlers/playermovement/PlayerMoveHandler.java +++ b/src/main/java/com/thekingelessar/assault/game/eventhandlers/playermovement/PlayerMoveHandler.java @@ -114,6 +114,11 @@ else if ((System.nanoTime() - gamePlayer.startTimeInAir) / 1000000000. > 5) return; } + if (PlayerMode.getPlayerMode(player) != null && PlayerMode.getPlayerMode(player).equals(PlayerMode.SPECTATOR)) + { + return; + } + if (gameInstance.gameStage.equals(GameStage.BUILDING)) { GamePlayer gamePlayer = gameInstance.getGamePlayer(player); @@ -122,7 +127,7 @@ else if ((System.nanoTime() - gamePlayer.startTimeInAir) / 1000000000. > 5) if (newLocation.getX() > gameInstance.gameMap.borderX && gamePlayer.gameTeam.mapBase.objective.x < gameInstance.gameMap.borderX) { cancelMovement(playerMoveEvent); - + player.sendMessage(Assault.ASSAULT_PREFIX + "You can't go over here!"); return; } @@ -130,7 +135,7 @@ else if ((System.nanoTime() - gamePlayer.startTimeInAir) / 1000000000. > 5) if (newLocation.getX() < gameInstance.gameMap.borderX && gamePlayer.gameTeam.mapBase.objective.x > gameInstance.gameMap.borderX) { cancelMovement(playerMoveEvent); - + player.sendMessage(Assault.ASSAULT_PREFIX + "You can't go over here!"); return; }