From 0b6d2a73b81c1f43ca03f6527d8ccc95fff50599 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 16 Oct 2023 11:13:44 +0200 Subject: moved chat config into chat category and changed to red color for incompatibility message in config description. --- .../skyhanni/config/features/ChatConfig.java | 23 ++++++++++++++++++++++ .../skyhanni/config/features/MiscConfig.java | 22 --------------------- .../skyhanni/features/misc/PlayerChatSymbols.kt | 2 +- 3 files changed, 24 insertions(+), 23 deletions(-) (limited to 'src') 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 a2f8f78ad..8168f98d0 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java @@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.config.FeatureToggle; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.annotations.Accordion; import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; import io.github.moulberry.moulconfig.annotations.ConfigOption; import org.lwjgl.input.Keyboard; @@ -115,6 +116,28 @@ public class ChatConfig { public boolean chatFilter = false; } + @Expose + @ConfigOption(name = "Player Chat Symbols", desc = "") + @Accordion + public ChatSymbols chatSymbols = new ChatSymbols(); + + public static class ChatSymbols { + + @Expose + @ConfigOption(name = "Enabled", desc = "Adds extra symbols to the chat such as those from ironman, " + + "stranded, bingo or nether factions and places them next to your regular player emblems. " + + "§cDoes not work with hide rank hider!") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Chat Symbol Location", desc = "Determines where the symbols should go in chat in relation to the " + + "player's name. Hidden will hide all emblems from the chat. §eRequires above setting to be on to hide the symbols.") + @ConfigEditorDropdown(values = {"Left", "Right", "Hidden"}) + public int symbolLocation = 0; + } + @Expose @ConfigOption(name = "Dungeon Filter", desc = "Hide annoying messages in Dungeons.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java index 9b515dbd9..ea9abf625 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java @@ -660,28 +660,6 @@ public class MiscConfig { public Position position = new Position(400, 200, 1.3f); } - @Expose - @ConfigOption(name = "Player Chat Symbols", desc = "") - @Accordion - public ChatSymbols chatSymbols = new ChatSymbols(); - - public static class ChatSymbols { - - @Expose - @ConfigOption(name = "Enabled", desc = "Adds extra symbols to the chat such as those from ironman, " + - "stranded, bingo or nether factions and places them next to your regular player emblems. §eDoes" + - " not work with hide rank hider!") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Chat Symbol Location", desc = "Determines where the symbols should go in chat in relation to the " + - "player's name. Hidden will hide all emblems from the chat. §eRequires above setting to be on to hide the symbols.") - @ConfigEditorDropdown(values = {"Left", "Right", "Hidden"}) - public int symbolLocation = 0; - } - @Expose @ConfigOption(name = "Exp Bottles", desc = "Hides all the experience orbs lying on the ground.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PlayerChatSymbols.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PlayerChatSymbols.kt index 80ec276db..c3d45ccee 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/PlayerChatSymbols.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PlayerChatSymbols.kt @@ -16,7 +16,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent // code inspired by SBA but heavily modified to be more functional and actually work class PlayerChatSymbols { - private val config get() = SkyHanniMod.feature.misc.chatSymbols + private val config get() = SkyHanniMod.feature.chat.chatSymbols private val nameSymbols = mutableMapOf() private val symbolsPattern = "^(?(?:(?:§\\w)+\\S)+) ".toPattern() private val symbolPattern = "((?:§\\w)+\\S)".toPattern() -- cgit