ok fixed some bugs

Signed-off-by: Robinson Gallego <robinson.leal7@gmail.com>
This commit is contained in:
Robinson Gallego
2019-07-31 12:19:23 -04:00
parent c3d35487e7
commit ae1701613b
29 changed files with 57 additions and 36 deletions

View File

@ -35,8 +35,12 @@ public class History
String compactUuid = uuid.toString().replace("-", "");
try
{
//UUIDs or playernames actually work with this one
//TODO: fix the stupid api on how it's not working name histories
//URL url = new URL("https://api.ashcon.app/mojang/v2/user/" + compactUuid);
URL url = new URL("https://api.mojang.com/user/profiles/" + compactUuid + "/names");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
//conn.setRequestProperty("User-Agent", "");
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
FName[] oldNames = gson.fromJson(reader, FName[].class);
if (oldNames == null)