summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorWalker Selby <git@walkerselby.com>2023-11-26 07:28:18 +0000
committerGitHub <noreply@github.com>2023-11-26 08:28:18 +0100
commit0721f250f4519b45891b4ae169d5e20ef175b0c5 (patch)
tree97089cae15ecd4cdd2a071be7b9e6ed31cb51503 /src/main/java/at/hannibal2/skyhanni/data
parent46e531ada4a3b4b324b892bfbebd86c82939c5d5 (diff)
downloadskyhanni-0721f250f4519b45891b4ae169d5e20ef175b0c5.tar.gz
skyhanni-0721f250f4519b45891b4ae169d5e20ef175b0c5.tar.bz2
skyhanni-0721f250f4519b45891b4ae169d5e20ef175b0c5.zip
Internal Change: Code Cleanup (#661)
Code cleanup #661
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/OtherMod.kt42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/OtherMod.kt b/src/main/java/at/hannibal2/skyhanni/data/OtherMod.kt
deleted file mode 100644
index 391d66975..000000000
--- a/src/main/java/at/hannibal2/skyhanni/data/OtherMod.kt
+++ /dev/null
@@ -1,42 +0,0 @@
-package at.hannibal2.skyhanni.data
-
-import at.hannibal2.skyhanni.config.ConfigManager
-import com.google.gson.JsonObject
-import java.io.BufferedReader
-
-enum class OtherMod(val modName: String, val configPath: String, val readKey: (BufferedReader) -> (String)) {
- NEU("Not Enough Updates", "config/notenoughupdates/configNew.json", { reader ->
- getJson(reader)["apiData"].asJsonObject["apiKey"].asString
- }),
- COW("Cowlection", "config/cowlection/do-not-share-me-with-other-players.cfg", { reader ->
- val lines = reader.readText().split(System.lineSeparator())
- val line = lines.find { it.startsWith(" S:moo=") }!!
- line.split("=")[1]
- }),
- DSM("Dankers SkyBlock Mod", "config/Danker's Skyblock Mod.cfg", { reader ->
- val lines = reader.readText().split(System.lineSeparator())
- val line = lines.find { it.startsWith(" S:APIKey=") }!!
- line.split("=")[1]
- }),
- DG("Dungeons Guide", "config/dungeonsguide/config.json", { reader ->
- getJson(reader)["partykicker.apikey"].asJsonObject["apikey"].asString
- }),
- SKYTILS("Skytils", "config/skytils/config.toml", { reader ->
- val lines = reader.readText().split(System.lineSeparator())
- val line = lines.find { it.startsWith(" hypixel_api_key = \"") }!!
- line.split("\"")[1]
- }),
- HYPIXEL_API_KEY_MANAGER("Hypixel API Key Manager", "HypixelApiKeyManager/localdata.json", { reader ->
- getJson(reader)["key"].asString
- }),
- SOOPY("Soopy Addons", "soopyAddonsData/apikey.txt", { reader ->
- reader.readText()
- }),
- SBE("SkyBlock Extras", "config/SkyblockExtras.cfg", { reader ->
- getJson(reader)["values"].asJsonObject["apiKey"].asString
- }),
-}
-
-fun getJson(reader: BufferedReader): JsonObject {
- return ConfigManager.gson.fromJson(reader, com.google.gson.JsonObject::class.java)
-} \ No newline at end of file