aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorThunderblade73 <85900443+Thunderblade73@users.noreply.github.com>2024-09-17 16:10:42 +0200
committerGitHub <noreply@github.com>2024-09-17 16:10:42 +0200
commit864a36ff3d5b8ede1878fcbc73f2f1ceb1485150 (patch)
tree08d717e7faaec161b18c7b3db77507344fa1f548 /src/main/java/at/hannibal2/skyhanni/features
parent1dcc43a3f37591912f086299c298df4e0e471bd9 (diff)
downloadskyhanni-864a36ff3d5b8ede1878fcbc73f2f1ceb1485150.tar.gz
skyhanni-864a36ff3d5b8ede1878fcbc73f2f1ceb1485150.tar.bz2
skyhanni-864a36ff3d5b8ede1878fcbc73f2f1ceb1485150.zip
Fix: Mining Update ItemCategory (#2529)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/PrivateIslandNoPickaxeAbility.kt10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PrivateIslandNoPickaxeAbility.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PrivateIslandNoPickaxeAbility.kt
index a29bcecc5..dc55af349 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/PrivateIslandNoPickaxeAbility.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PrivateIslandNoPickaxeAbility.kt
@@ -21,12 +21,10 @@ object PrivateIslandNoPickaxeAbility {
if (!config.privateIslandNoPickaxeAbility) return
if (event.clickType != ClickType.RIGHT_CLICK) return
- when (event.itemInHand?.getItemCategoryOrNull()) {
- ItemCategory.GAUNTLET, ItemCategory.PICKAXE, ItemCategory.DRILL -> {
- event.cancel()
- }
-
- else -> {}
+ if (event.itemInHand?.getItemCategoryOrNull()?.let {
+ ItemCategory.miningTools.contains(it)
+ } == true) {
+ event.cancel()
}
}
}