Skip to content

An easy to use api for Kotlin for interacting with NameMC

Notifications You must be signed in to change notification settings

EinfachGustafArchive/namemc-api-kt

Repository files navigation

namemc-api-kt

An easy to use api for Kotlin interacting with NameMC

Example

import live.einfachgustaf.namemc.NameMcApiImpl
import live.einfachgustaf.namemc.api.NameMcApi
import java.util.*

suspend fun main() {
    NameMcApi.setGlobalInstance(NameMcApiImpl())

    NameMcApi.getInstance().getServerByAddress("einfachgustaf.live").getLikes().forEach { 
        println(it.getUuid())
    }

    val hasPlayerLiked = NameMcApi.getInstance().getServerByAddress("einfachgustaf.live")
        .hasPlayerLiked(UUID.fromString("72ccbc0c-a35f-4492-2450-971a26607ee0"))

    println(hasPlayerLiked)
}

Dependencies

repositories {
    maven("https://jitpack.io")
}

dependencies {
    implementation("com.github.EinfachGustaf:namemc-api-kt:Tag")
}

About

An easy to use api for Kotlin for interacting with NameMC

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages