Hypixel Api Utils
object HypixelApiUtils
Methods for accessing the Hypixel API.
Getting a response from an http query takes some time. Therefore the methods in here should only be used suspended in coroutines that do not block the main thread. To ensure that none of the methods are used on accident in the main thread they have the suspend keyword. This only allows them to be used in a coroutine. In general the IO dispatcher is the best choice for these coroutines. The following shows an example of how to use getSecrets.
scope.launch(Dispatchers.IO) {
val uuid = mc.thePlayer.uniqueID.toString()
val secrets = HypixelApiUtils.getSecrets(uuid)
modMessage("$secrets")
}
Content copied to clipboard
Author
Aton