diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/render/TabFriends.kt b/src/main/java/me/zeroeightsix/kami/module/modules/render/TabFriends.kt index aff6c4aab..4376e39fc 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/render/TabFriends.kt +++ b/src/main/java/me/zeroeightsix/kami/module/modules/render/TabFriends.kt @@ -2,9 +2,11 @@ package me.zeroeightsix.kami.module.modules.render import me.zeroeightsix.kami.manager.managers.FriendManager import me.zeroeightsix.kami.module.Module +import me.zeroeightsix.kami.setting.ModuleConfig.setting +import me.zeroeightsix.kami.util.color.EnumTextColor +import me.zeroeightsix.kami.util.text.format import net.minecraft.client.network.NetworkPlayerInfo import net.minecraft.scoreboard.ScorePlayerTeam -import net.minecraft.util.text.TextFormatting @Module.Info( name = "TabFriends", @@ -13,10 +15,16 @@ import net.minecraft.util.text.TextFormatting showOnArray = false ) object TabFriends : Module() { + private val color = setting("Color", EnumTextColor.GREEN) + @JvmStatic fun getPlayerName(info: NetworkPlayerInfo): String { - val name = info.displayName?.formattedText - ?: ScorePlayerTeam.formatPlayerName(info.playerTeam, info.gameProfile.name) - return if (FriendManager.isFriend(name)) "${TextFormatting.GREEN}$name" else name + val name = info.displayName?.formattedText ?: ScorePlayerTeam.formatPlayerName(info.playerTeam, info.gameProfile.name) + + return if (FriendManager.isFriend(name)) { + color.value format name + } else { + name + } } } \ No newline at end of file