diff --git a/eco-core/core-nms/v1_16_R3/src/main/kotlin/com/willfp/eco/proxy/v1_16_R3/Skull.kt b/eco-core/core-nms/v1_16_R3/src/main/kotlin/com/willfp/eco/proxy/v1_16_R3/Skull.kt index c59c27f7..5e98ce71 100644 --- a/eco-core/core-nms/v1_16_R3/src/main/kotlin/com/willfp/eco/proxy/v1_16_R3/Skull.kt +++ b/eco-core/core-nms/v1_16_R3/src/main/kotlin/com/willfp/eco/proxy/v1_16_R3/Skull.kt @@ -36,8 +36,9 @@ class Skull : SkullProxy { profile = meta.javaClass.getDeclaredField("profile") profile.isAccessible = true } - val profile = profile[meta] as GameProfile? - val property = profile?.properties?.get("textures") as Property? - return property?.value + val profile = profile[meta] as GameProfile? ?: return null + val properties = profile.properties ?: return null + val prop = properties["textures"] ?: return null + return prop.toMutableList().firstOrNull()?.name } } \ No newline at end of file diff --git a/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/proxy/v1_17_R1/Skull.kt b/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/proxy/v1_17_R1/Skull.kt index 529ca6b7..287dd70f 100644 --- a/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/proxy/v1_17_R1/Skull.kt +++ b/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/proxy/v1_17_R1/Skull.kt @@ -36,8 +36,9 @@ class Skull : SkullProxy { profile = meta.javaClass.getDeclaredField("profile") profile.isAccessible = true } - val profile = profile[meta] as GameProfile? - val property = profile?.properties?.get("textures") as Property? - return property?.value + val profile = profile[meta] as GameProfile? ?: return null + val properties = profile.properties ?: return null + val prop = properties["textures"] ?: return null + return prop.toMutableList().firstOrNull()?.name } } \ No newline at end of file