aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorThunderblade73 <85900443+Thunderblade73@users.noreply.github.com>2024-01-28 18:25:36 +0100
committerGitHub <noreply@github.com>2024-01-28 18:25:36 +0100
commitf283110860650130aea7ae42504e0f48fff9b0fb (patch)
treec2e79d5ecb2b521ecc29e6816c06eb5cb00e6883 /src/main/java
parent0dd709b35f05359c48650ea8fc83f6c2479e56d8 (diff)
downloadskyhanni-f283110860650130aea7ae42504e0f48fff9b0fb.tar.gz
skyhanni-f283110860650130aea7ae42504e0f48fff9b0fb.tar.bz2
skyhanni-f283110860650130aea7ae42504e0f48fff9b0fb.zip
fix (#959)
Fixed rare error in Harp Features. #959
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt
index 5e6656b3b..96de875f2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt
@@ -159,7 +159,7 @@ object HarpFeatures {
if (event.slot?.slotNumber != closeButtonSlot) return
if (openTime.passedSince() > 2.seconds) return
event.container.inventory.indexOfFirst {
- songSelectedPattern.anyMatches(it.getLore())
+ songSelectedPattern.anyMatches(it?.getLore() ?: return@indexOfFirst false)
}.takeIf { it != -1 }?.let {
event.isCanceled = true
Minecraft.getMinecraft().playerController.windowClick(