diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/kotlin/skytils/skytilsmod/Skytils.kt | 47 | ||||
-rw-r--r-- | src/main/kotlin/skytils/skytilsmod/features/impl/dungeons/ScoreCalculation.kt | 2 |
2 files changed, 24 insertions, 25 deletions
diff --git a/src/main/kotlin/skytils/skytilsmod/Skytils.kt b/src/main/kotlin/skytils/skytilsmod/Skytils.kt index 0520e571..2d764491 100644 --- a/src/main/kotlin/skytils/skytilsmod/Skytils.kt +++ b/src/main/kotlin/skytils/skytilsmod/Skytils.kt @@ -248,36 +248,35 @@ class Skytils { val cch = ClientCommandHandler.instance - if (cch is AccessorCommandHandler) { - cch.registerCommand(SkytilsCommand) + if (cch !is AccessorCommandHandler) throw RuntimeException("Skytils was unable to mixin to the CommandHandler. Please report this on our Discord at discord.gg/skytils.") + cch.registerCommand(SkytilsCommand) - cch.registerCommand(CataCommand) - cch.registerCommand(CalcXPCommand) - cch.registerCommand(HollowWaypointCommand) - cch.registerCommand(SlayerCommand) + cch.registerCommand(CataCommand) + cch.registerCommand(CalcXPCommand) + cch.registerCommand(HollowWaypointCommand) + cch.registerCommand(SlayerCommand) - if (!cch.commands.containsKey("armorcolor")) { - cch.registerCommand(ArmorColorCommand) - } + if (!cch.commands.containsKey("armorcolor")) { + cch.registerCommand(ArmorColorCommand) + } - if (!cch.commands.containsKey("glintcustomize")) { - cch.registerCommand(GlintCustomizeCommand) - } + if (!cch.commands.containsKey("glintcustomize")) { + cch.registerCommand(GlintCustomizeCommand) + } - if (!cch.commands.containsKey("trackcooldown")) { - cch.registerCommand(TrackCooldownCommand) - } + if (!cch.commands.containsKey("trackcooldown")) { + cch.registerCommand(TrackCooldownCommand) + } - if (config.overrideReparty || !cch.commands.containsKey("reparty")) { - cch.commandSet.add(RepartyCommand) - cch.commandMap["reparty"] = RepartyCommand - } + if (config.overrideReparty || !cch.commands.containsKey("reparty")) { + cch.commandSet.add(RepartyCommand) + cch.commandMap["reparty"] = RepartyCommand + } - if (config.overrideReparty || !cch.commands.containsKey("rp")) { - cch.commandSet.add(RepartyCommand) - cch.commandMap["rp"] = RepartyCommand - } - } else throw RuntimeException("Skytils was unable to mixin to the CommandHandler. Please report this on our Discord at discord.gg/skytils.") + if (config.overrideReparty || !cch.commands.containsKey("rp")) { + cch.commandSet.add(RepartyCommand) + cch.commandMap["rp"] = RepartyCommand + } DataFetcher.preload() MayorInfo.fetchMayorData() diff --git a/src/main/kotlin/skytils/skytilsmod/features/impl/dungeons/ScoreCalculation.kt b/src/main/kotlin/skytils/skytilsmod/features/impl/dungeons/ScoreCalculation.kt index 583262c8..0e9318c4 100644 --- a/src/main/kotlin/skytils/skytilsmod/features/impl/dungeons/ScoreCalculation.kt +++ b/src/main/kotlin/skytils/skytilsmod/features/impl/dungeons/ScoreCalculation.kt @@ -219,7 +219,7 @@ object ScoreCalculation { val matcher = partyAssistSecretsPattern.matcher(unformatted) if (matcher.find()) { val name = matcher.group("name") - val secrets = matcher.group("secrets").toInt() + val secrets = matcher.group("secrets").toIntOrNull() ?: return if (!rooms.containsKey(name)) { rooms[name] = secrets } |