aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-22 20:46:51 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-22 20:46:51 +0200
commit6f020d1cb58ed282c597ee2691b3c816b2f7b375 (patch)
treed523276e3bb76060cdab0286bd8aaefc06b0220a /src/main
parent675dd8531eec7de4b850c87f8ee55c25447fb79b (diff)
downloadskyhanni-6f020d1cb58ed282c597ee2691b3c816b2f7b375.tar.gz
skyhanni-6f020d1cb58ed282c597ee2691b3c816b2f7b375.tar.bz2
skyhanni-6f020d1cb58ed282c597ee2691b3c816b2f7b375.zip
fixed fishing hook display triggering on wrong texts.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt
index 4275bbbfc..c05ffcc80 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt
@@ -19,6 +19,7 @@ class FishingHookDisplay {
private var bobber: EntityFishHook? = null
private var armorStand: EntityArmorStand? = null
private val potentionArmorStands = mutableListOf<EntityArmorStand>()
+ private val pattern = "§e§l(\\d+(\\.\\d+)?)".toPattern()
@SubscribeEvent
fun onWorldChange(event: LorenzWorldChangeEvent) {
@@ -91,11 +92,7 @@ class FishingHookDisplay {
if (name == "§c§l!!!") {
return true
}
- if (name.startsWith("§e§l") && !name.contains("CLICK")) {
- return true
- }
-
- return false
+ return pattern.matcher(name).matches()
}
fun isEnabled() = LorenzUtils.inSkyBlock && config.enabled && FishingAPI.hasFishingRodInHand()