public static void setOwner(final Skull skull, String ownerName) { SkinUtils.fetchProfile(ownerName, new SkinUtils.ProfileCallback() { @Override public void result(SkinUtils.ProfileResponse response) { if (response != null) { Object gameProfile = response.getGameProfile(); InventoryUtils.setSkullProfile(skull, gameProfile); } skull.update(true, false); } }); }
public static void setOwner(final Skull skull, UUID uuid) { SkinUtils.fetchProfile(uuid, new SkinUtils.ProfileCallback() { @Override public void result(SkinUtils.ProfileResponse response) { if (response != null) { Object gameProfile = response.getGameProfile(); InventoryUtils.setSkullProfile(skull, gameProfile); } skull.update(true, false); } }); }
public static void setSkullOwner(final ItemStack itemStack, String ownerName, final SkullLoadedCallback callback) { SkinUtils.fetchProfile(ownerName, new SkinUtils.ProfileCallback() { @Override public void result(SkinUtils.ProfileResponse response) { if (response != null) { Object gameProfile = response.getGameProfile(); ItemMeta meta = itemStack.getItemMeta(); if (meta instanceof SkullMeta) { InventoryUtils.setSkullProfile(meta, gameProfile); itemStack.setItemMeta(meta); } } if (callback != null) { callback.updated(itemStack); } } }); }
public static void setSkullOwner(final ItemStack itemStack, UUID ownerUUID, final SkullLoadedCallback callback) { SkinUtils.fetchProfile(ownerUUID, new SkinUtils.ProfileCallback() { @Override public void result(SkinUtils.ProfileResponse response) { if (response != null) { Object gameProfile = response.getGameProfile(); ItemMeta meta = itemStack.getItemMeta(); if (meta instanceof SkullMeta) { InventoryUtils.setSkullProfile(meta, gameProfile); itemStack.setItemMeta(meta); } } if (callback != null) { callback.updated(itemStack); } } }); }
@Override public void result(UUID uuid) { if (uuid != null) { fetchProfile(uuid, callback); } else { callback.result(null); } } });
if (playerName != null) { loading = true; SkinUtils.fetchProfile(playerName, new SkinUtils.ProfileCallback() { @Override public void result(SkinUtils.ProfileResponse response) {