From da42c2f26802031630916ae4190488e6478c4855 Mon Sep 17 00:00:00 2001 From: Daniel Walsh Date: Mon, 25 Dec 2023 09:28:52 +0000 Subject: [PATCH] authlib no longer ships with getValue, use a global (#241) --- .../io/github/bakedlibs/dough/skins/CustomGameProfile.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dough-skins/src/main/java/io/github/bakedlibs/dough/skins/CustomGameProfile.java b/dough-skins/src/main/java/io/github/bakedlibs/dough/skins/CustomGameProfile.java index 69a9ddd6..8fc6f0e8 100644 --- a/dough-skins/src/main/java/io/github/bakedlibs/dough/skins/CustomGameProfile.java +++ b/dough-skins/src/main/java/io/github/bakedlibs/dough/skins/CustomGameProfile.java @@ -32,10 +32,12 @@ public final class CustomGameProfile extends GameProfile { static final String PROPERTY_KEY = "textures"; private final URL skinUrl; + private final String texture; CustomGameProfile(@Nonnull UUID uuid, @Nullable String texture, @Nonnull URL url) { super(uuid, PLAYER_NAME); this.skinUrl = url; + this.texture = texture; if (texture != null) { getProperties().put(PROPERTY_KEY, new Property(PROPERTY_KEY, texture)); @@ -68,6 +70,6 @@ void apply(@Nonnull SkullMeta meta) throws NoSuchFieldException, IllegalAccessEx */ @Nullable public String getBase64Texture() { - return getProperties().get(PROPERTY_KEY).iterator().next().getValue(); + return this.texture; } }