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 | |
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')
4 files changed, 29 insertions, 11 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index cd2c458c8..897b3dc0f 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -203,6 +203,7 @@ import at.hannibal2.skyhanni.features.misc.SuperpairsClicksAlert import at.hannibal2.skyhanni.features.misc.ThunderSparksHighlight import at.hannibal2.skyhanni.features.misc.TimeFeatures import at.hannibal2.skyhanni.features.misc.TpsCounter +import at.hannibal2.skyhanni.features.misc.compacttablist.AdvancedPlayerList import at.hannibal2.skyhanni.features.misc.compacttablist.TabListReader import at.hannibal2.skyhanni.features.misc.compacttablist.TabListRenderer import at.hannibal2.skyhanni.features.misc.discordrpc.DiscordRPCManager @@ -322,7 +323,7 @@ class SkyHanniMod { fun preInit(event: FMLPreInitializationEvent?) { checkIfNeuIsLoaded() - // utils + // data loadModule(this) loadModule(ChatManager) loadModule(HypixelData()) @@ -363,6 +364,7 @@ class SkyHanniMod { loadModule(DefaultConfigFeatures) loadModule(EntityOutlineRenderer) loadModule(KeyboardManager) + loadModule(AdvancedPlayerList) // APIs loadModule(BazaarApi()) 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 ea9abf625..23dcd5429 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java @@ -624,9 +624,13 @@ public class MiscConfig { public boolean markSpecialPersons = false; @Expose - @ConfigOption(name = "Mark SkyHanni Devs", desc = "Adds a §c:O §7behind the tablist name of SkyHanni's creators.") + @ConfigOption( + name = "Mark SkyHanni Devs", + desc = "Adds a §c:O §7behind the tablist name of §cSkyHanni's contributors§7. " + + "§eThose are the folks that coded the mod for you for free :)" + ) @ConfigEditorBoolean - public boolean markSkyHanniDevs = false; + public boolean markSkyHanniContributors = false; } } 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" } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/ContributorListJson.java b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/ContributorListJson.java new file mode 100644 index 000000000..77e3d639b --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/ContributorListJson.java @@ -0,0 +1,8 @@ +package at.hannibal2.skyhanni.utils.jsonobjects; +import com.google.gson.annotations.Expose; + +import java.util.List; +public class ContributorListJson { + @Expose + public List<String> usernames; +} |