From 864a36ff3d5b8ede1878fcbc73f2f1ceb1485150 Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Tue, 17 Sep 2024 16:10:42 +0200 Subject: Fix: Mining Update ItemCategory (#2529) --- .../skyhanni/features/misc/PrivateIslandNoPickaxeAbility.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') 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() } } } -- cgit