Skip to content

Commit

Permalink
Fixed issue - spectators couldn't be teleported
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan923 committed Aug 28, 2020
1 parent e8bbc09 commit 931853b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/me/stefan923/superlms/game/GameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -260,16 +260,16 @@ public void addSpectator(Player player) {

Bukkit.getOnlinePlayers().forEach(targetPlayer -> targetPlayer.hidePlayer(player));
if (status.equals(GameStatus.WAITING) || status.equals(GameStatus.STARTING)) {
player.teleport(deserializeLocation("Game.Locations.Lobby"));
player.teleport(deserializeLocation(settings.getString("Game.Locations.Lobby")));
} else {
player.teleport(deserializeLocation("Game.Locations.Arena"));
player.teleport(deserializeLocation(settings.getString("Game.Locations.Arena")));
}
}

public void removeSpectator(Player player) {
instance.getSpectators().remove(player);

player.teleport(deserializeLocation("Game.Locations.Spawn"));
player.teleport(deserializeLocation(settings.getString("Game.Locations.Spawn")));
Bukkit.getOnlinePlayers().forEach(targetPlayer -> targetPlayer.showPlayer(player));
}

Expand Down

0 comments on commit 931853b

Please sign in to comment.