forked from SteamWar/SteamWar
Fix event initialization check in TNTLeagueConfig
This commit is contained in:
@@ -52,7 +52,7 @@ data class TNTLeagueConfig(
|
|||||||
val redTeam: TeamConfig
|
val redTeam: TeamConfig
|
||||||
|
|
||||||
init {
|
init {
|
||||||
if (eventFightId != null) {
|
if (isEvent() && eventFightId != null) {
|
||||||
eventFight = EventFight.get(eventFightId) ?: throw IllegalArgumentException("EventFight with ID $eventFightId not found")
|
eventFight = EventFight.get(eventFightId) ?: throw IllegalArgumentException("EventFight with ID $eventFightId not found")
|
||||||
|
|
||||||
event = Event.get(eventFight.eventID)
|
event = Event.get(eventFight.eventID)
|
||||||
|
|||||||
Reference in New Issue
Block a user