diff options
Diffstat (limited to 'src/main/java/at')
-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 |