diff options
author | Walker Selby <git@walkerselby.com> | 2023-10-17 13:17:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-17 14:17:24 +0200 |
commit | a793c14d3b246afbbb657e6a919806194c4cf64c (patch) | |
tree | 5652f9bb8e913749b6d3c20a77c04fe1dab89c73 /src/main/java/at/hannibal2/skyhanni/features | |
parent | 9d2327e269f17ca0718a6071ff2c3a72f6254b86 (diff) | |
download | skyhanni-a793c14d3b246afbbb657e6a919806194c4cf64c.tar.gz skyhanni-a793c14d3b246afbbb657e6a919806194c4cf64c.tar.bz2 skyhanni-a793c14d3b246afbbb657e6a919806194c4cf64c.zip |
Internal Change: Dev List from REPO (#545)
moved contributor list into repo #545
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt index d4f994a24..6c60de732 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.data.FriendAPI import at.hannibal2.skyhanni.data.GuildAPI import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.PartyAPI +import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests import at.hannibal2.skyhanni.utils.KeyboardManager @@ -13,7 +14,9 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import at.hannibal2.skyhanni.utils.jsonobjects.ContributorListJson import com.google.common.cache.CacheBuilder +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.concurrent.TimeUnit import kotlin.random.Random @@ -131,13 +134,14 @@ object AdvancedPlayerList { return denyKeyPressed || !SkyHanniDebugsAndTests.globalRender } - private val listOfSkyHanniDevsOrPeopeWhoKnowALotAboutModdingSeceneButAreBadInCoding = listOf( - "hannibal2", - "CalMWolfs", - "HiZe_", - "lrg89", - "Eisengolem", - ) + private var contributors: List<String> = emptyList() + + @SubscribeEvent + fun onRepoReload(event: RepositoryReloadEvent) { + event.getConstant<ContributorListJson>("ContributorList")?.usernames?.let { + contributors = it + } + } private fun createCustomName(data: PlayerData): String { val playerName = if (config.useLevelColorForName) { @@ -157,7 +161,7 @@ object AdvancedPlayerList { val score = socialScore(data.name) suffix += " " + getSocialScoreIcon(score) } - if (config.markSkyHanniDevs && data.name in listOfSkyHanniDevsOrPeopeWhoKnowALotAboutModdingSeceneButAreBadInCoding) { + if (config.markSkyHanniContributors && data.name in contributors) { suffix += " §c:O" } |