diff options
author | bowser0000 <bowser0000@gmail.com> | 2021-11-20 22:39:13 -0500 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2021-11-20 22:39:13 -0500 |
commit | 8bd93c4ff81de99f73d24314e0bfd180e6f25255 (patch) | |
tree | c2ab3b893af64ef89b138f1bc30805b71b36df7c /src/main/java/me/Danker/handlers | |
parent | 0e0321b594305981af84c884d9d3183533380121 (diff) | |
download | SkyblockMod-8bd93c4ff81de99f73d24314e0bfd180e6f25255.tar.gz SkyblockMod-8bd93c4ff81de99f73d24314e0bfd180e6f25255.tar.bz2 SkyblockMod-8bd93c4ff81de99f73d24314e0bfd180e6f25255.zip |
Add /hotmof command
Also make API handler use UTF-8
Diffstat (limited to 'src/main/java/me/Danker/handlers')
-rw-r--r-- | src/main/java/me/Danker/handlers/APIHandler.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/handlers/APIHandler.java b/src/main/java/me/Danker/handlers/APIHandler.java index 4417973..736a7d7 100644 --- a/src/main/java/me/Danker/handlers/APIHandler.java +++ b/src/main/java/me/Danker/handlers/APIHandler.java @@ -15,6 +15,7 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; +import java.nio.charset.StandardCharsets; import java.util.Scanner; public class APIHandler { @@ -28,7 +29,7 @@ public class APIHandler { conn.setRequestProperty("User-Agent", "Dsm/1.0"); if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) { - BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); + BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8)); String input; StringBuilder response = new StringBuilder(); |