fix: fixed bug where spectator joins as player if free spot available

This commit is contained in:
Yannik Bretschneider 2021-06-07 17:05:56 +02:00
parent 1be8a503bf
commit 5e6745ee23

View File

@ -101,7 +101,13 @@ public class LobbyManager {
return; return;
} }
ParticipantType type = lobby.freeSlot(); ParticipantType type;
if (role == RoleEnum.SPECTATOR) {
type = ParticipantType.Spectator;
} else {
type = lobby.freeSlot();
}
Logger.trace("New participant '{}' has the role '{}'", client.id.getName(), type); Logger.trace("New participant '{}' has the role '{}'", client.id.getName(), type);