Skip to content
This repository was archived by the owner on May 18, 2020. It is now read-only.
This repository was archived by the owner on May 18, 2020. It is now read-only.

Failed to set SkinUrl of empty Skin #63

@higgs01

Description

@higgs01

Hello

When i try to set the Skin-Url from a Empty skin:

ItemStack is = new ItemStack(Material.SKULL_ITEM, 1, (short) 3) {
    @Override
    public void click(Click click) {

    }
};
SkullMeta meta = (SkullMeta) is.getItemMeta();
meta.setDisplayName(ProxyServer.getInstance().getPlayer(clientProfile.getLastName()) == null ? "§7" + clientProfile.getLastName() : "§6" + clientProfile.getLastName());
Skin skin = SkinFactory.createEmptySkin();
skin.setSkin(clientProfile.getTexture());
meta.setSkin(skin);

I get following error:

09:06:11 [SCHWERWIEGEND] Caused by: org.json.JSONException: JSONObject["textures"] not found.
09:06:11 [SCHWERWIEGEND]     at org.json.JSONObject.get(JSONObject.java:471)
09:06:11 [SCHWERWIEGEND]     at org.json.JSONObject.getJSONObject(JSONObject.java:636)
09:06:11 [SCHWERWIEGEND]     at dev.wolveringer.bungeeutil.profile.Skin.setSkin(Skin.java:207)
09:06:11 [SCHWERWIEGEND]     at my.own.package.FriendsGui.createPlayerSkull(FriendsGui.java:76)
09:06:11 [SCHWERWIEGEND]     at my.own.package.FriendsGui.buildGui(FriendsGui.java:40)
09:06:11 [SCHWERWIEGEND]     at my.own.package.FriendsGui.<init>(FriendsGui.java:31)
09:06:11 [SCHWERWIEGEND]     at my.own.package.FriendCommandList.onFriend(FriendCommandList.java:154)
09:06:11 [SCHWERWIEGEND]     ... 46 more

BungeeUtils-Version: 2.6.1
BungeeCord-Version: 1.12.-SNAPSHOT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions