diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt | 4 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt b/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt index 53ffdae71..231f059d1 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt @@ -2,11 +2,11 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigManager +import at.hannibal2.skyhanni.data.jsonobjects.local.MayorJson import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.utils.APIUtil import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.put -import at.hannibal2.skyhanni.data.jsonobjects.local.MayorJson import io.github.moulberry.notenoughupdates.util.SkyBlockTime import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch @@ -40,7 +40,7 @@ class MayorElection { if (System.currentTimeMillis() > lastUpdate + 60_000 * 5) { lastUpdate = System.currentTimeMillis() SkyHanniMod.coroutineScope.launch { - val url = "https://api.hypixel.net/resources/skyblock/election" + val url = "https://api.hypixel.net/v2/resources/skyblock/election" val jsonObject = withContext(dispatcher) { APIUtil.getJSONResponse(url) } rawMayorData = ConfigManager.gson.fromJson(jsonObject, MayorJson::class.java) val data = rawMayorData ?: return@launch diff --git a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt index 61f19a630..452003c1e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt @@ -25,7 +25,7 @@ class BazaarDataHolder { private fun loadNpcPrices(): MutableMap<NEUInternalName, Double> { val list = mutableMapOf<NEUInternalName, Double>() try { - val itemsData = APIUtil.getJSONResponse("https://api.hypixel.net/resources/skyblock/items") + val itemsData = APIUtil.getJSONResponse("https://api.hypixel.net/v2/resources/skyblock/items") val motesPrice = mutableMapOf<NEUInternalName, Double>() for (element in itemsData["items"].asJsonArray) { val jsonObject = element.asJsonObject @@ -73,4 +73,4 @@ class BazaarDataHolder { bazaarData[internalName] = data return data } -}
\ No newline at end of file +} |