Party player head texture is now async

This commit is contained in:
Indyuce 2020-07-05 23:04:29 +02:00
parent 349735395e
commit 68c40816a3

View File

@ -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();
}