Update User.cs

This commit is contained in:
Dima YaFlay
2023-10-24 21:39:54 +03:00
committed by GitHub
parent 9aa976b234
commit 2a3a8f876e

View File

@@ -24,7 +24,6 @@ public class User
using(HttpClient client = new())
{
uuid = (string)JsonNode.Parse(await client.GetStringAsync($"https://api.mojang.com/users/profiles/minecraft/{name}"))["id"];
profile = JsonNode.Parse(await client.GetStringAsync($"https://sessionserver.mojang.com/session/minecraft/profile/{uuid}"));
}
User user = new(name, uuid, profile);
return user;
@@ -32,6 +31,6 @@ public class User
public string GetSkinPart(SkinPart skinPart, string size = "64")
{
return (string)$"https://visage.surgeplay.com/{skinPart}/{size}/{this.profile["profileId"]}";
return (string)$"https://visage.surgeplay.com/{skinPart}/{size}/{this.uuid}";
}
}