From 6b7f10c8035ded519ee2de35c59a1b5e6a837705 Mon Sep 17 00:00:00 2001 From: Dima YaFlay <93622229+YaFlay@users.noreply.github.com> Date: Mon, 16 Oct 2023 19:06:58 +0300 Subject: [PATCH] Update User.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit кхм --- src/Types/User.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Types/User.cs b/src/Types/User.cs index dfa06ff..6396b12 100644 --- a/src/Types/User.cs +++ b/src/Types/User.cs @@ -10,15 +10,15 @@ public class User private HttpClient client = new(); - public bool IsPlayer() => this.Name != null ? true : false; + public bool IsPlayer() => Name != null ? true : false; - public User() + public User(string name) { - Uuid = 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}")); + Uuid = JsonNode.Parse(client.GetStringAsync($"https://api.mojang.com/users/profiles/minecraft/{name}"))["id"]; + profile = JsonNode.Parse(client.GetStringAsync($"https://sessionserver.mojang.com/session/minecraft/profile/{Uuid}")); } - public async Task GetSkinPart(SkinPart skinPart, string size = "64") + public string GetSkinPart(SkinPart skinPart, string size = "64") { return (string)$"https://visage.surgeplay.com/{skinPart}/{size}/{this.profile["profileId"]}" }