diff --git a/src/main/java/dev/andante/audience/player/PlayerReference.java b/src/main/java/dev/andante/audience/player/PlayerReference.java index 4a964e4..f47b502 100644 --- a/src/main/java/dev/andante/audience/player/PlayerReference.java +++ b/src/main/java/dev/andante/audience/player/PlayerReference.java @@ -17,6 +17,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.net.URI; import java.net.URL; import java.util.Collections; import java.util.Optional; @@ -121,7 +122,7 @@ default String getMojangApiPlayerName() { UUID uuid = this.getReferenceUuid(); String urlString = "https://sessionserver.mojang.com/session/minecraft/profile/" + uuid; try { - URL url = new URL(urlString); + URL url = URI.create(urlString).toURL(); try (InputStream stream = url.openStream()) { InputStreamReader reader = new InputStreamReader(stream); JsonElement jsonElement = JsonParser.parseReader(reader); diff --git a/src/main/kotlin/dev/andante/audience/resource/ByteResourcePack.kt b/src/main/kotlin/dev/andante/audience/resource/ByteResourcePack.kt index 5f311eb..3d94164 100644 --- a/src/main/kotlin/dev/andante/audience/resource/ByteResourcePack.kt +++ b/src/main/kotlin/dev/andante/audience/resource/ByteResourcePack.kt @@ -33,6 +33,7 @@ data class ByteResourcePack( /** * Hashes a byte array to a sha1 string. */ + @Suppress("DEPRECATION") private fun hashSha1(bytes: ByteArray): String { return Hashing.sha1().hashBytes(bytes).toString() }