diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt index a1e74a17e..e309f5b66 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt @@ -201,11 +201,13 @@ object SkillAPI { return } + val skillType = activeSkill + if (skillType == null) { + event.addIrrelevant("activeSkill is null") + return + } + event.addData { - val skillType = activeSkill - if (skillType == null) { - event.addIrrelevant("activeSkill is null") - } storage[skillType]?.let { skillInfo -> addDebug(skillType, skillInfo) } @@ -228,7 +230,7 @@ object SkillAPI { } } - private fun MutableList<String>.addDebug(skillType: SkillType?, skillInfo: SkillInfo) { + private fun MutableList<String>.addDebug(skillType: SkillType, skillInfo: SkillInfo) { add("Name: $skillType") add("- Level: ${skillInfo.level}") add("- CurrentXp: ${skillInfo.currentXp}") |