From c6828e22528a5b7bbeb8b03c201bf5da9c9072c8 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 21 Apr 2024 22:26:55 +0200 Subject: add player messages global toggle --- .../skyhanni/config/features/chat/PlayerMessagesConfig.java | 6 ++++++ .../at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/chat/PlayerMessagesConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/chat/PlayerMessagesConfig.java index a8903f4f1..b7b4cc792 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/chat/PlayerMessagesConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/chat/PlayerMessagesConfig.java @@ -12,6 +12,12 @@ import java.util.List; public class PlayerMessagesConfig { + @Expose + @ConfigOption(name = "Enable Chat Formatting", desc = "Enable player caht modifications. Required for all settings below.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enable = true; + @Expose @ConfigOption( name = "Part Order", diff --git a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt index 4463270b3..55735413b 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt @@ -182,7 +182,7 @@ class PlayerNameFormatter { return MarkedPlayerManager.replaceInChat(result) } - fun isEnabled() = LorenzUtils.inSkyBlock && (config.playerRankHider || config.chatFilter || config.sameChatColor) + fun isEnabled() = LorenzUtils.inSkyBlock && config.enable @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { -- cgit