From 4b80139bee4d547d69a443d26a03b500fbf7984c Mon Sep 17 00:00:00 2001 From: Dima YaFlay <93622229+YaFlay@users.noreply.github.com> Date: Tue, 24 Oct 2023 21:40:32 +0300 Subject: [PATCH 1/5] Update User.cs --- src/Types/User.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Types/User.cs b/src/Types/User.cs index 149a1b4..d5ec0ba 100644 --- a/src/Types/User.cs +++ b/src/Types/User.cs @@ -6,7 +6,6 @@ public class User { public string Name { get; } public string Uuid { get; } - public JsonNode profile { get; } public bool IsPlayer() => Name != null ? true : false; @@ -24,7 +23,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 +30,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}"; } } From 2f08e6122add1f49e9b108e346822c41e2ada2a6 Mon Sep 17 00:00:00 2001 From: Dima YaFlay <93622229+YaFlay@users.noreply.github.com> Date: Tue, 24 Oct 2023 22:25:58 +0300 Subject: [PATCH 2/5] Update User.cs --- src/Types/User.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Types/User.cs b/src/Types/User.cs index d5ec0ba..3e3cd82 100644 --- a/src/Types/User.cs +++ b/src/Types/User.cs @@ -9,22 +9,20 @@ public class User public bool IsPlayer() => Name != null ? true : false; - public User(string name, string uuid, JsonNode profile) + public User(string name, string uuid) { Name = name; Uuid = uuid; - this.profile = profile; } public static async Task CreateUser(string name) { string uuid; - JsonNode profile; using(HttpClient client = new()) { uuid = (string)JsonNode.Parse(await client.GetStringAsync($"https://api.mojang.com/users/profiles/minecraft/{name}"))["id"]; } - User user = new(name, uuid, profile); + User user = new(name, uuid); return user; } From 06a5196259e671946b7d141f0ba084de72bb0808 Mon Sep 17 00:00:00 2001 From: Dima YaFlay <93622229+YaFlay@users.noreply.github.com> Date: Tue, 24 Oct 2023 22:28:27 +0300 Subject: [PATCH 3/5] Update User.cs --- src/Types/User.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Types/User.cs b/src/Types/User.cs index 3e3cd82..d642ae5 100644 --- a/src/Types/User.cs +++ b/src/Types/User.cs @@ -28,6 +28,6 @@ public class User public string GetSkinPart(SkinPart skinPart, string size = "64") { - return (string)$"https://visage.surgeplay.com/{skinPart}/{size}/{this.uuid}"; + return (string)$"https://visage.surgeplay.com/{skinPart}/{size}/{this.Uuid}"; } } From 6f9f4be29c5453298800b6791939716c0a1c455e Mon Sep 17 00:00:00 2001 From: Mih4n <50325226+Mih4n@users.noreply.github.com> Date: Wed, 25 Oct 2023 20:55:14 +0300 Subject: [PATCH 4/5] Update dotnet.yml --- .github/workflows/dotnet.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 25f43e7..f3fb31a 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -23,6 +23,12 @@ jobs: - name: Restore dependencies run: dotnet restore - name: Build - run: dotnet build --no-restore + run: dotnet build --configuration Release --no-restore - name: Test run: dotnet test --no-build --verbosity normal + - name: Publish + uses: brandedoutcast/publish-nuget@v2.5.5 + with: + PROJECT_FILE_PATH: src/spworlds.csproj + NUGET_KEY: ${{secrets.NUGET_API_KEY}} + From fd79d786b60aea57b22fc567883e57a7abcbc752 Mon Sep 17 00:00:00 2001 From: Mih4n <50325226+Mih4n@users.noreply.github.com> Date: Wed, 25 Oct 2023 20:57:00 +0300 Subject: [PATCH 5/5] Update spworlds.csproj --- src/spworlds.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spworlds.csproj b/src/spworlds.csproj index d127f1b..1fd6258 100644 --- a/src/spworlds.csproj +++ b/src/spworlds.csproj @@ -7,7 +7,7 @@ spworlds данная библиотека предназначена для работы с сайтом spworlds. Ознакомиться с документацией можно в гитхабе проекта MIT - 1.0.1 + 1.0.5 Mih4n Mih4n https://github.com/Mih4n/spworlds