diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2023-12-09 12:00:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-09 12:00:38 +0100 |
commit | e3200d4540f33e4a52b17a05176238feff4e67c7 (patch) | |
tree | 0bcca16617d975ca4a98f2cc3612bac96d93cee3 /src/main/java/at | |
parent | 533bd580df0b689e4a0c67d5a83f2aab2bf9eb91 (diff) | |
download | skyhanni-e3200d4540f33e4a52b17a05176238feff4e67c7.tar.gz skyhanni-e3200d4540f33e4a52b17a05176238feff4e67c7.tar.bz2 skyhanni-e3200d4540f33e4a52b17a05176238feff4e67c7.zip |
fix nullPointerException (#778)
Fixed error message when closing wheat minion in hub. #778
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt index 53f385662..5fc4474d9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt @@ -187,10 +187,12 @@ class MinionFeatures { coinsPerDay = "" lastInventoryClosed = System.currentTimeMillis() - val location = lastMinion ?: return + if (IslandType.PRIVATE_ISLAND.isInIsland()) { + val location = lastMinion ?: return - if (location !in minions) { - minions[location]!!.lastClicked = 0 + if (location !in minions) { + minions[location]?.lastClicked = 0 + } } MinionCloseEvent().postAndCatch() } |