aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-26 08:29:00 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-26 08:29:00 +0100
commitb20949157a618a9f087b4e8c9b042bcc4958ac24 (patch)
tree791564b991254fc59f7ac18242ac16f0e9925595
parent0721f250f4519b45891b4ae169d5e20ef175b0c5 (diff)
downloadskyhanni-b20949157a618a9f087b4e8c9b042bcc4958ac24.tar.gz
skyhanni-b20949157a618a9f087b4e8c9b042bcc4958ac24.tar.bz2
skyhanni-b20949157a618a9f087b4e8c9b042bcc4958ac24.zip
Code cleanup
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt1
4 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
index 52830478d..d5569c12c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
@@ -108,8 +108,7 @@ class ItemDisplayOverlayFeatures {
if (itemNumberAsStackSize.contains(9) &&
InventoryUtils.openInventoryName() == "Your Skills" &&
- item.getLore()
- .any { it.contains("Click to view!") }
+ item.getLore().any { it.contains("Click to view!") }
) {
if (CollectionAPI.isCollectionTier0(item.getLore())) return "0"
val split = itemName.split(" ")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt
index a9650df6b..c5335b3c5 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt
@@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.RenderItemTipEvent
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.StringUtils.matches
import at.hannibal2.skyhanni.utils.jsonobjects.ItemsJson
import net.minecraftforge.event.entity.player.ItemTooltipEvent
import net.minecraftforge.fml.common.eventhandler.EventPriority
@@ -31,7 +32,7 @@ class ItemStars {
if (stars > 0) {
var name = itemName
- while (starFindPattern.matcher(name).matches()) {
+ while (starFindPattern.matches(name)) {
name = name.replaceFirst("§.✪".toRegex(), "")
}
name = name.trim()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt
index df617f538..eee256884 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt
@@ -19,7 +19,6 @@ class HideMobNames {
init {
// TODO USE SH-REPO
addMobToHide("Zombie")
- addMobToHide("Zombie")
addMobToHide("Zombie Villager")
addMobToHide("Crypt Ghoul")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt
index 511701cbd..e1755f988 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt
@@ -35,6 +35,7 @@ class SummoningMobManager {
private var searchArmorStands = false
private var searchMobs = false
+ // TODO repo
//§aYou have spawned your Tank Zombie §r§asoul! §r§d(249 Mana)
private val spawnPattern = "§aYou have spawned your (.+) §r§asoul! §r§d\\((\\d+) Mana\\)".toPattern()
private val despawnPattern = "§cYou have despawned your (monster|monsters)!".toPattern()