diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt index be7e16482..162675486 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt @@ -130,11 +130,12 @@ object SlayerQuestWarning { // workaround for Bladesoul in Crimson Isle if (LorenzUtils.skyBlockArea == "Stronghold" && entity.name == "Skeleton") return false - val activeSlayer = SlayerAPI.activeSlayer + val isSlayer = slayerType.clazz.isInstance(entity) + if (!isSlayer) return false - if (activeSlayer != null) { - if (slayerType != activeSlayer) { - val activeSlayerName = activeSlayer.displayName + SlayerAPI.activeSlayer?.let { + if (slayerType != it) { + val activeSlayerName = it.displayName val slayerName = slayerType.displayName SlayerAPI.latestWrongAreaWarning = SimpleTimeMark.now() warn( @@ -144,8 +145,7 @@ object SlayerQuestWarning { } } - val isSlayer = slayerType.clazz.isInstance(entity) - return (getSlayerData().lastSlayerType == slayerType) && isSlayer + return getSlayerData().lastSlayerType == slayerType } @SubscribeEvent |