diff --git a/src/main/java/de/crightgames/blxckoxymoron/paintball/game/config/GameConfig.kt b/src/main/java/de/crightgames/blxckoxymoron/paintball/game/config/GameConfig.kt index 8b7d3e0..91b30ba 100644 --- a/src/main/java/de/crightgames/blxckoxymoron/paintball/game/config/GameConfig.kt +++ b/src/main/java/de/crightgames/blxckoxymoron/paintball/game/config/GameConfig.kt @@ -10,7 +10,7 @@ import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds -class GameConfig() : ConfigurationSerializable { +class GameConfig(cfg: MutableMap = mutableMapOf()) : ConfigurationSerializable { /** * game, gameLoop, refill, respawn, shot, kill, timer, restart, regen @@ -29,7 +29,7 @@ class GameConfig() : ConfigurationSerializable { var noReplace = DefaultConfig.noReplace - constructor(cfg: MutableMap) : this() { + init { val cfgDurations = cfg["durations"] as? Map<*, *> ?: mapOf() val mappedDurs = DefaultConfig.durations +