aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-24 16:57:52 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-24 16:57:52 +0100
commit640d2800eb97bce9f501ee93360c06fff700caf2 (patch)
tree8b40133463fd8329b09ad189df41189193c0812b /src/main/java/at/hannibal2/skyhanni/features/misc
parent6941e54613973a50a80f0101b60928e622a3d07e (diff)
downloadskyhanni-640d2800eb97bce9f501ee93360c06fff700caf2.tar.gz
skyhanni-640d2800eb97bce9f501ee93360c06fff700caf2.tar.bz2
skyhanni-640d2800eb97bce9f501ee93360c06fff700caf2.zip
Fixed non god pot effects display stay after profile switch.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
index b95f68885..c037598e6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
@@ -2,12 +2,14 @@ package at.hannibal2.skyhanni.features.misc
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
+import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.events.PacketEvent
+import at.hannibal2.skyhanni.events.PreProfileSwitchEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
@@ -69,6 +71,12 @@ class NonGodPotEffectDisplay {
private var patternEffectsCount = "§7You have §e(?<name>\\d+) §7non-god effects\\.".toPattern()
private var totalEffectsCount = 0
+ @SubscribeEvent
+ fun onPreProfileSwitch(event: PreProfileSwitchEvent) {
+ effectDuration.clear()
+ display = emptyList()
+ }
+
// todo : cleanup and add support for poison candy I, and add support for splash / other formats
@SubscribeEvent
fun onChatMessage(event: LorenzChatEvent) {
@@ -159,6 +167,7 @@ class NonGodPotEffectDisplay {
fun onTick(event: LorenzTickEvent) {
if (!isEnabled()) return
if (!event.repeatSeconds(1)) return
+ if (!ProfileStorageData.loaded) return
update()
}