aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2023-12-12 09:44:36 +1100
committerGitHub <noreply@github.com>2023-12-11 23:44:36 +0100
commit004a12365fe5b88c59afae5291578bc9d1e1491c (patch)
treebc287533414fed9dc97da48a7a71f78a187f9b1e
parentc85c55e4c15715e7a4667cbacbdc5c953fdb3d7f (diff)
downloadskyhanni-004a12365fe5b88c59afae5291578bc9d1e1491c.tar.gz
skyhanni-004a12365fe5b88c59afae5291578bc9d1e1491c.tar.bz2
skyhanni-004a12365fe5b88c59afae5291578bc9d1e1491c.zip
added toggle to hide autopet messages (#675)
Added toggle to hide autopet messages. #675
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/misc/pets/PetConfig.java7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt2
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"
}
}