aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-04-21 22:26:55 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-04-21 22:26:55 +0200
commitc6828e22528a5b7bbeb8b03c201bf5da9c9072c8 (patch)
tree1dde97eb5df0be3cd632d6a887dbad63db11afdc /src/main/java/at/hannibal2
parent07df8a9cdc6fa9bbc4156c776e8863b1c1affbf1 (diff)
downloadskyhanni-c6828e22528a5b7bbeb8b03c201bf5da9c9072c8.tar.gz
skyhanni-c6828e22528a5b7bbeb8b03c201bf5da9c9072c8.tar.bz2
skyhanni-c6828e22528a5b7bbeb8b03c201bf5da9c9072c8.zip
add player messages global toggle
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/chat/PlayerMessagesConfig.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt2
2 files changed, 7 insertions, 1 deletions
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
@@ -13,6 +13,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",
desc = "Drag text to change the chat message format order for chat messages."
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) {