aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorLorenz <ESs95s3P5z8Pheb>2022-07-15 20:32:47 +0200
committerLorenz <ESs95s3P5z8Pheb>2022-07-15 20:32:47 +0200
commit2228a6cbc2f84f293141555a3cf52ee5051ee042 (patch)
treeadd5e5aec91b17b3103a2cb2c562cbc0b8512d62 /src/main/java/at
parentb2bfad74f8c48426516fcdf875280d991babfe5f (diff)
downloadskyhanni-2228a6cbc2f84f293141555a3cf52ee5051ee042.tar.gz
skyhanni-2228a6cbc2f84f293141555a3cf52ee5051ee042.tar.bz2
skyhanni-2228a6cbc2f84f293141555a3cf52ee5051ee042.zip
code cleanup
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt
index 2ebbb1821..8c7a18ed2 100644
--- a/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt
@@ -34,11 +34,10 @@ class HideNotClickableItems {
@SubscribeEvent
fun onRepoReload(event: RepositoryReloadEvent) {
- val constant = event.getConstant("HideNotClickableItems")!!
-
try {
- hideNpcSellList.load(constant["hide_npc_sell"].asJsonObject)
- hideBackpackList.load(constant["hide_backpack"].asJsonObject)
+ val hideNotClickableItems = event.getConstant("HideNotClickableItems")!!
+ hideNpcSellList.load(hideNotClickableItems["hide_npc_sell"].asJsonObject)
+ hideBackpackList.load(hideNotClickableItems["hide_backpack"].asJsonObject)
} catch (e: Exception) {
e.printStackTrace()
LorenzUtils.error("error in RepositoryReloadEvent")
@@ -275,7 +274,7 @@ class HideNotClickableItems {
}
private fun hideChestBackpack(chestName: String, stack: ItemStack): Boolean {
- if (!chestName.contains("Ender Chest") && !chestName.contains("Backpack")) return false
+ if (!chestName.contains("Ender Chest") && !chestName.contains("Backpack") && chestName != "Storage") return false
val name = stack.cleanName()
@@ -289,14 +288,6 @@ class HideNotClickableItems {
}
val result = hideBackpackList.match(name)
-// val result = when {
-// name.endsWith("New Year Cake Bag") -> true
-// name == "Nether Wart Pouch" -> true
-// name == "Basket of Seeds" -> true
-// name == "Builder's Wand" -> true
-//
-// else -> false
-// }
if (result) hideReason = "Bags cannot be put into the storage!"
return result