From 2d0f63b156f936e9f056537a67eaa13bffa54c27 Mon Sep 17 00:00:00 2001 From: Lorenz Date: Wed, 7 Sep 2022 11:02:13 +0200 Subject: SummoningSoulsName integrate into SummoningMobManager config logic --- .../java/at/hannibal2/skyhanni/config/features/Abilities.java | 6 ++++++ src/main/java/at/hannibal2/skyhanni/config/features/Chat.java | 6 ++++++ src/main/java/at/hannibal2/skyhanni/config/features/Misc.java | 6 ------ .../java/at/hannibal2/skyhanni/features/SummoningMobManager.kt | 9 +++++++++ .../java/at/hannibal2/skyhanni/features/SummoningSoulsName.kt | 2 +- 5 files changed, 22 insertions(+), 7 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Abilities.java b/src/main/java/at/hannibal2/skyhanni/config/features/Abilities.java index b9a69ed8c..a6c9c50f4 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Abilities.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Abilities.java @@ -16,6 +16,12 @@ public class Abilities { @ConfigEditorBoolean public boolean itemAbilityCooldownBackground = false; + @Expose + @ConfigOption(name = "Summoning Soul Display", desc = "Show the name of dropped summoning souls laying on the ground. " + + "§cNot working in Dungeon if Skytils' 'Hide Non-Starred Mobs Nametags' feature is enabled!") + @ConfigEditorBoolean + public boolean summoningSoulDisplay = false; + @Expose @ConfigOption(name = "Summoning Mob", desc = "") @ConfigEditorAccordion(id = 0) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java b/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java index 14baeeeb7..f674680bc 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java @@ -87,4 +87,10 @@ public class Chat { "except for players who are close to the player, inside dungeon or during a Kuudra fight.") @ConfigEditorBoolean public boolean hideFarDeathMessages = false; + + @Expose + @ConfigOption(name = "Hide Far Deaths 2", desc = "Hide the death messages of other players, " + + "except for players who are close to the player, inside dungeon or during a Kuudra fight.") + @ConfigEditorBoolean + public boolean hideFarDeathMessages2 = false; } diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java index d8ad7886e..4c58a5118 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java @@ -23,12 +23,6 @@ public class Misc { @ConfigEditorBoolean public boolean hideExpBottles = false; - @Expose - @ConfigOption(name = "Summon Soul Display", desc = "Shows the name above summoning souls that ready to pick up. " + - "§cNot working in Dungeon if Skytils' 'Hide Non-Starred Mobs Nametags' feature is enabled!") - @ConfigEditorBoolean - public boolean summonSoulDisplay = false; - @Expose @ConfigOption(name = "Skytils Damage Splash", desc = "Fixing the custom damage splash feature from skytils.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt b/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt index 36dbab9ed..03d9382d1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt @@ -36,6 +36,9 @@ class SummoningMobManager { //§a§ohannibal2's Tank Zombie§r §a160k§c❤ private val healthPattern = Pattern.compile("§a§o(.+)'s (.+)§r §[ae]([\\dkm]+)§c❤") + //§cThe Seraph recalled your 3 summoned allies! + private val seraphRecallPattern = Pattern.compile("§cThe Seraph recalled your (\\d) summoned allies!") + @SubscribeEvent fun onChatMessage(event: LorenzChatEvent) { if (!LorenzUtils.isOnHypixel) return @@ -57,6 +60,12 @@ class SummoningMobManager { event.blockedReason = "summoning_soul" } } + if (message == "§cThe Seraph recalled your summoned ally!" || seraphRecallPattern.matcher(message).matches()) { + despawned() + if (SkyHanniMod.feature.abilities.summoningMobDisplay) { + event.blockedReason = "summoning_soul" + } + } } var tick = 0 diff --git a/src/main/java/at/hannibal2/skyhanni/features/SummoningSoulsName.kt b/src/main/java/at/hannibal2/skyhanni/features/SummoningSoulsName.kt index ec813395a..59784f027 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/SummoningSoulsName.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/SummoningSoulsName.kt @@ -127,6 +127,6 @@ class SummoningSoulsName { } private fun isEnabled(): Boolean { - return LorenzUtils.inSkyblock && SkyHanniMod.feature.misc.summonSoulDisplay + return LorenzUtils.inSkyblock && SkyHanniMod.feature.abilities.summoningSoulDisplay } } \ No newline at end of file -- cgit