summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-15 22:07:19 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-15 22:07:19 +0100
commitce9cbd10d24d287bcb630900d14a9d5b1369f3b5 (patch)
treee79abdc420c3535009fd2c30aa0bb403bc44f599 /src/main/java/at/hannibal2/skyhanni/features
parentd39621e047877117fe7082b324c6403013dfb9b7 (diff)
downloadskyhanni-ce9cbd10d24d287bcb630900d14a9d5b1369f3b5.tar.gz
skyhanni-ce9cbd10d24d287bcb630900d14a9d5b1369f3b5.tar.bz2
skyhanni-ce9cbd10d24d287bcb630900d14a9d5b1369f3b5.zip
Allowing nullable parameters for regex functions matches() and find().
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ShiftClickNPCSell.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ShiftClickNPCSell.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ShiftClickNPCSell.kt
index db1375b75..9a18572b1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ShiftClickNPCSell.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ShiftClickNPCSell.kt
@@ -29,7 +29,7 @@ object ShiftClickNPCSell {
@SubscribeEvent
fun onOpen(event: InventoryFullyOpenedEvent) {
if (!LorenzUtils.inSkyBlock) return
- inInventory = lastLoreLineOfSellPattern.matches(event.inventoryItems[sellSlot]?.getLore()?.lastOrNull() ?: "")
+ inInventory = lastLoreLineOfSellPattern.matches(event.inventoryItems[sellSlot]?.getLore()?.lastOrNull())
}
@SubscribeEvent
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 9aee4035d..f5552701e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
@@ -133,7 +133,7 @@ class MinionFeatures {
if (!minionTitlePattern.find(event.inventoryName)) return
event.inventoryItems[48]?.let {
- if (minionCollectItemPattern.matches(it.name ?: "")) {
+ if (minionCollectItemPattern.matches(it.name)) {
MinionOpenEvent(event.inventoryName, event.inventoryItems).postAndCatch()
return
}