diff --git a/common/src/main/kotlin/com/bluedragonmc/server/Game.kt b/common/src/main/kotlin/com/bluedragonmc/server/Game.kt index ab5a12d..42b6112 100644 --- a/common/src/main/kotlin/com/bluedragonmc/server/Game.kt +++ b/common/src/main/kotlin/com/bluedragonmc/server/Game.kt @@ -73,6 +73,7 @@ abstract class Game(val name: String, val mapName: String, val mode: String? = n gameState = state.mapToRpcState() openSlots = maxPlayers - players.size joinable = state.canPlayersJoin + maxSlots = maxPlayers } internal val players: MutableList = CopyOnWriteArrayList() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 33ff34a..d2e81c9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,7 +11,7 @@ okhttp = "4.10.0" serialization = "1.5.0-RC" tinylog = "2.6.2" # Auto-generated GRPC/Protobuf messaging code -rpc = "fb16ef4cc5" +rpc = "e06867b34a" # Agones SDK and its necessary runtime dependencies agones-kt = "0.1.2" grpc = "1.50.2" diff --git a/src/main/kotlin/com/bluedragonmc/server/impl/IncomingRPCHandlerImpl.kt b/src/main/kotlin/com/bluedragonmc/server/impl/IncomingRPCHandlerImpl.kt index 173e377..81cc3a2 100644 --- a/src/main/kotlin/com/bluedragonmc/server/impl/IncomingRPCHandlerImpl.kt +++ b/src/main/kotlin/com/bluedragonmc/server/impl/IncomingRPCHandlerImpl.kt @@ -83,6 +83,9 @@ class IncomingRPCHandlerImpl(serverPort: Int) : IncomingRPCHandler { this.gameState = game.rpcGameState this.instanceUuid = game.id this.gameType = game.gameType + game.getPlayers().forEach { player -> + this.playerUuids.add(player.uuid.toString()) + } } } }