forked from SteamWar/SteamWar
Fix team auto-assign logic in lobby state
Replaced `members.add` with `join` to correctly integrate new players into teams during the lobby phase. This ensures proper team setup and adherence to game mechanics.
This commit is contained in:
@@ -139,7 +139,7 @@ data class TNTLeagueTeam(val config: TeamConfig) {
|
||||
if (TNTLeagueGame.state == TNTLeagueGame.GameState.LOBBY) {
|
||||
if (members.isEmpty()) {
|
||||
plugin.server.onlinePlayers.firstOrNull { it != player && TNTLeagueGame.getTeam(it) == null }?.run {
|
||||
members.add(this)
|
||||
join(this)
|
||||
}
|
||||
}
|
||||
if (leader == player) {
|
||||
|
||||
Reference in New Issue
Block a user