diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyManager.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyManager.java index 56f51e4..28134bb 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyManager.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyManager.java @@ -11,6 +11,7 @@ import uulm.teamname.marvelous.gamelibrary.messages.server.ConfirmSelectionMessa import uulm.teamname.marvelous.gamelibrary.messages.server.GameAssignmentMessage; import uulm.teamname.marvelous.gamelibrary.messages.server.GeneralAssignmentMessage; import uulm.teamname.marvelous.server.netconnector.Client; +import uulm.teamname.marvelous.server.netconnector.ClientState; import uulm.teamname.marvelous.server.netconnector.SUID; import uulm.teamname.marvelous.server.netconnector.UserManager; @@ -185,6 +186,9 @@ public class LobbyManager { participant.sendMessage(response); if (complete) { + lobby.getPlayer1().getClient().state = ClientState.Playing; + lobby.getPlayer2().getClient().state = ClientState.Playing; + lobby.getSpectators().forEach(spectator -> spectator.getClient().state = ClientState.Playing); LobbyRunner.getInstance().startLobby(lobby); }