From 68c40816a3f42fb30d0f6eb0a5c66d2f86297041 Mon Sep 17 00:00:00 2001 From: Indyuce Date: Sun, 5 Jul 2020 23:04:29 +0200 Subject: [PATCH] Party player head texture is now async --- .../mmocore/gui/social/party/EditablePartyView.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/Indyuce/mmocore/gui/social/party/EditablePartyView.java b/src/main/java/net/Indyuce/mmocore/gui/social/party/EditablePartyView.java index 6cc3b822..c8e88cda 100644 --- a/src/main/java/net/Indyuce/mmocore/gui/social/party/EditablePartyView.java +++ b/src/main/java/net/Indyuce/mmocore/gui/social/party/EditablePartyView.java @@ -65,10 +65,11 @@ public class EditablePartyView extends EditableInventory { /* * run async to save performance */ - if (meta instanceof SkullMeta) { - ((SkullMeta) meta).setOwningPlayer(member.getPlayer()); - disp.setItemMeta(meta); - } + if (meta instanceof SkullMeta) + Bukkit.getScheduler().runTaskAsynchronously(MMOCore.plugin, () -> { + ((SkullMeta) meta).setOwningPlayer(member.getPlayer()); + disp.setItemMeta(meta); + }); return NBTItem.get(disp).addTag(new ItemTag("uuid", member.getUniqueId().toString())).toItem(); }