From dc619eea46194955ede129b6a7125be2c1e8fa74 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:49:47 +1000 Subject: Backend: Classes -> Objects with annotation (#1982) Co-authored-by: ThatGravyBoat --- .../java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt | 4 +++- .../at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/data/hypixel') diff --git a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt index 023589e0f..f8f8b4523 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt @@ -11,6 +11,7 @@ import at.hannibal2.skyhanni.data.hypixel.chat.event.PlayerShowItemChatEvent import at.hannibal2.skyhanni.data.hypixel.chat.event.PrivateMessageChatEvent import at.hannibal2.skyhanni.data.hypixel.chat.event.SystemMessageEvent import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ComponentMatcher import at.hannibal2.skyhanni.utils.ComponentMatcherUtils.intoSpan import at.hannibal2.skyhanni.utils.ComponentMatcherUtils.matchStyledMatcher @@ -23,7 +24,8 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent /** * Reading normal chat events, and splitting them up into many different player chat events, with all available extra information */ -class PlayerChatManager { +@SkyHanniModule +object PlayerChatManager { private val patternGroup = RepoPattern.group("data.chat.player") 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 b617fd118..94bc665b6 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 @@ -13,6 +13,7 @@ import at.hannibal2.skyhanni.features.bingo.BingoAPI import at.hannibal2.skyhanni.features.chat.playerchat.PlayerChatFilter import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager import at.hannibal2.skyhanni.features.misc.compacttablist.AdvancedPlayerList +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils.changeColor import at.hannibal2.skyhanni.utils.ComponentMatcherUtils.matchStyledMatcher import at.hannibal2.skyhanni.utils.ComponentSpan @@ -34,7 +35,8 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent * Listening to the player chat events, and applying custom chat options to them. * E.g. part order, rank hider, etc */ -class PlayerNameFormatter { +@SkyHanniModule +object PlayerNameFormatter { private val config get() = SkyHanniMod.feature.chat.playerMessage private val patternGroup = RepoPattern.group("data.chat.player.name") -- cgit