aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/misc/ApiData.kt
diff options
context:
space:
mode:
authorLorenz <ESs95s3P5z8Pheb>2022-07-23 10:19:23 +0200
committerLorenz <ESs95s3P5z8Pheb>2022-07-23 10:19:23 +0200
commit977991e8cfe61b843c922e380be72a0c72e886b5 (patch)
tree932873e7e1737f42a5ab57ef5d53b6b31cdc56a9 /src/main/java/at/hannibal2/skyhanni/misc/ApiData.kt
parenta9f7b8ec04cb356cbf6512228bfc1cb3623dccf0 (diff)
downloadskyhanni-977991e8cfe61b843c922e380be72a0c72e886b5.tar.gz
skyhanni-977991e8cfe61b843c922e380be72a0c72e886b5.tar.bz2
skyhanni-977991e8cfe61b843c922e380be72a0c72e886b5.zip
moving api key and current pet data into hidden config entry
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/misc/ApiData.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/misc/ApiData.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/misc/ApiData.kt b/src/main/java/at/hannibal2/skyhanni/misc/ApiData.kt
index 66db57981..b0437e852 100644
--- a/src/main/java/at/hannibal2/skyhanni/misc/ApiData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/misc/ApiData.kt
@@ -17,7 +17,7 @@ class ApiData {
fun onStatusBar(event: LorenzChatEvent) {
val message = event.message
if (message.startsWith("§aYour new API key is §r§b")) {
- SkyHanniMod.feature.apiData.apiKey = message.substring(26)
+ SkyHanniMod.feature.hidden.apiKey = message.substring(26)
LorenzUtils.chat("§b[SkyHanni] A new API Key has been detected and installed")
if (currentProfileName != "") {
@@ -35,7 +35,7 @@ class ApiData {
private fun updateApiData() {
val uuid = Minecraft.getMinecraft().thePlayer.uniqueID.toString().replace("-", "")
- val apiKey = SkyHanniMod.feature.apiData.apiKey
+ val apiKey = SkyHanniMod.feature.hidden.apiKey
if (apiKey.isEmpty()) {
LorenzUtils.error("SkyHanni has no API Key set. Type /api new to reload.")
@@ -72,7 +72,7 @@ class ApiData {
}
private fun loadProfile(playerUuid: String, profileId: String) {
- val apiKey = SkyHanniMod.feature.apiData.apiKey
+ val apiKey = SkyHanniMod.feature.hidden.apiKey
val url = "https://api.hypixel.net/skyblock/profile?key=$apiKey&profile=$profileId"
val jsonObject = APIUtil.getJSONResponse(url)