diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2023-12-12 09:44:36 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-11 23:44:36 +0100 |
commit | 004a12365fe5b88c59afae5291578bc9d1e1491c (patch) | |
tree | bc287533414fed9dc97da48a7a71f78a187f9b1e /src/main/java/at/hannibal2 | |
parent | c85c55e4c15715e7a4667cbacbdc5c953fdb3d7f (diff) | |
download | skyhanni-004a12365fe5b88c59afae5291578bc9d1e1491c.tar.gz skyhanni-004a12365fe5b88c59afae5291578bc9d1e1491c.tar.bz2 skyhanni-004a12365fe5b88c59afae5291578bc9d1e1491c.zip |
added toggle to hide autopet messages (#675)
Added toggle to hide autopet messages. #675
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/misc/pets/PetConfig.java | 7 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/pets/PetConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/pets/PetConfig.java index c6a32cee9..265c26a29 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/pets/PetConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/pets/PetConfig.java @@ -21,4 +21,11 @@ public class PetConfig { @ConfigOption(name = "Pet Experience Tooltip", desc = "") @Accordion public PetExperienceToolTipConfig petExperienceToolTip = new PetExperienceToolTipConfig(); + + @Expose + @ConfigOption(name = "Hide Autopet Messages", desc = "Hides the autopet messages from chat. §eRequires the " + + "display to be enabled.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideAutopet = false; } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt index 128e9a126..49d12b7aa 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt @@ -28,7 +28,7 @@ class CurrentPetDisplay { fun onChatMessage(event: LorenzChatEvent) { findPetInChat(event.message)?.let { PetAPI.currentPet = it - if (config.display) { + if (config.display && config.hideAutopet) { event.blockedReason = "pets" } } |