diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-05 12:38:01 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-05 12:38:01 +0100 |
commit | 08078a7b2bd94e6d0522a75039a49b5755b96d26 (patch) | |
tree | 51c2b10234de44b72bf6952318965fa0109df83e /src/main/java/at/hannibal2/skyhanni | |
parent | d9a1a8dda967f40bd4a7a2707bf3ff5411093e7d (diff) | |
download | skyhanni-08078a7b2bd94e6d0522a75039a49b5755b96d26.tar.gz skyhanni-08078a7b2bd94e6d0522a75039a49b5755b96d26.tar.bz2 skyhanni-08078a7b2bd94e6d0522a75039a49b5755b96d26.zip |
Fixed error when king talisman helper does not find the king in range.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt index 501ae420e..93e12cc6f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt @@ -83,7 +83,7 @@ class KingTalismanHelper { private fun checkOffset() { val king = EntityUtils.getEntitiesNearby<EntityArmorStand>(LorenzVec(129.6, 196.0, 196.7), 2.0) - .filter { it.name.startsWith("§6§lKing ") }.first() + .filter { it.name.startsWith("§6§lKing ") }.firstOrNull() ?: return val foundKing = "§6§lKing (?<name>.*)".toPattern().matchMatcher(king.name) { group("name") } ?: return |