diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-24 10:27:16 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-24 10:27:16 +0200 |
commit | 3f1df5013434dd9f5d3fc2c7491447e1833ac4da (patch) | |
tree | 7b211c9489f7481d0ef29c0c22ad13e92d6e92d4 /src/main/java/at/hannibal2 | |
parent | 7aa7e7abb165b267c8521a43cc975fd545542ae2 (diff) | |
download | skyhanni-3f1df5013434dd9f5d3fc2c7491447e1833ac4da.tar.gz skyhanni-3f1df5013434dd9f5d3fc2c7491447e1833ac4da.tar.bz2 skyhanni-3f1df5013434dd9f5d3fc2c7491447e1833ac4da.zip |
Added Sack change chat message Hider.
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java | 10 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java index 4c68e8a3f..36f25d999 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java @@ -161,6 +161,16 @@ public class ChatConfig { @FeatureToggle public boolean hideArachneMessages = false; + @Expose + @ConfigOption( + name = "Sacks Hider", + desc = "Hide the chat's sack change message with this, " + + "not in Hypixel settings, for mods to access sack data in new features." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean hideSacksChange = false; + // TODO reenable once the translator is working again // @Expose // @ConfigOption( diff --git a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt index 89363fd7c..c0604f5da 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt @@ -26,6 +26,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object SackAPI { private val sackDisplayConfig get() = SkyHanniMod.feature.inventory.sackDisplay + private val chatConfig get() = SkyHanniMod.feature.chat private var lastOpenedInventory = "" var inSackInventory = false @@ -223,6 +224,9 @@ object SackAPI { sackChanges.add(SackChange(delta, internalName, sacks)) } SackChangeEvent(sackChanges, otherItemsAdded, otherItemsRemoved).postAndCatch() + if (chatConfig.hideSacksChange) { + event.blockedReason = "sacks_change" + } } @SubscribeEvent |