aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorThunderblade73 <85900443+Thunderblade73@users.noreply.github.com>2023-12-09 12:00:38 +0100
committerGitHub <noreply@github.com>2023-12-09 12:00:38 +0100
commite3200d4540f33e4a52b17a05176238feff4e67c7 (patch)
tree0bcca16617d975ca4a98f2cc3612bac96d93cee3 /src/main
parent533bd580df0b689e4a0c67d5a83f2aab2bf9eb91 (diff)
downloadskyhanni-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')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt8
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()
}