From b22201a1a203a354d25d078001c5e044e32b1a6d Mon Sep 17 00:00:00 2001 From: kirillsaint Date: Fri, 9 Feb 2024 22:52:01 +0600 Subject: [PATCH] (fix) custom skins --- .../client/mixin/mixins/AbstractClientPlayerMixin.java | 2 +- .../net/silentclient/client/utils/types/PlayerResponse.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/silentclient/client/mixin/mixins/AbstractClientPlayerMixin.java b/src/main/java/net/silentclient/client/mixin/mixins/AbstractClientPlayerMixin.java index 5358059..bf2231c 100644 --- a/src/main/java/net/silentclient/client/mixin/mixins/AbstractClientPlayerMixin.java +++ b/src/main/java/net/silentclient/client/mixin/mixins/AbstractClientPlayerMixin.java @@ -112,7 +112,7 @@ public abstract class AbstractClientPlayerMixin implements AbstractClientPlayerE (new Thread("CustomSkinThread") { public void run() { Client.logger.info(String.format("Downloading Custom Skin (%s)", silent$nameClear)); - customSkin.setImage(SCTextureManager.getImage("https://cdn.silentclient.net/skins/" + silent$nameClear.toLowerCase() + ".png")); + customSkin.setImage(SCTextureManager.getImage("https://cdn-test.silentclient.net/file/silentclient/" + silent$account.getCustomSkinPath())); CustomSkin.loading = false; customSkin.setLoaded(true); Client.logger.info(String.format("Custom Skin downloaded! (%s)", silent$nameClear)); diff --git a/src/main/java/net/silentclient/client/utils/types/PlayerResponse.java b/src/main/java/net/silentclient/client/utils/types/PlayerResponse.java index cbcf8a4..5488250 100644 --- a/src/main/java/net/silentclient/client/utils/types/PlayerResponse.java +++ b/src/main/java/net/silentclient/client/utils/types/PlayerResponse.java @@ -66,6 +66,7 @@ public class PlayerResponse extends AbstractReply { public int is_jr_admin; public int is_tester_manager; public BigInteger discord_id; + public String custom_skin_path; public int getPlusExpiration() { if(plus_expiration != null) { @@ -428,6 +429,10 @@ public class PlayerResponse extends AbstractReply { } + public String getCustomSkinPath() { + return custom_skin_path; + } + public Cosmetics getCosmetics() { return cosmetics; }