From ebed0d3983a3113aed2fbc6b04dbe11f68d94296 Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Thu, 20 Apr 2023 20:33:03 +0100 Subject: [PATCH] Fixed issue #795 about bugs linked to the party GUI. --- .../Indyuce/mmocore/gui/social/friend/EditableFriendList.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/social/friend/EditableFriendList.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/social/friend/EditableFriendList.java index 32163ea2..eeb88cb9 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/social/friend/EditableFriendList.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/social/friend/EditableFriendList.java @@ -144,11 +144,10 @@ public class EditableFriendList extends EditableInventory { if (inv.getPlayerData().getFriends().size() <= n) return super.display(inv, n); - final OfflinePlayer friend = getEffectivePlayer(inv, n); + final OfflinePlayer friend = Bukkit.getOfflinePlayer(inv.getPlayerData().getFriends().get(n)); ItemStack disp = (friend.isOnline() ? online : offline).display(inv, n); ItemMeta meta = disp.getItemMeta(); meta.getPersistentDataContainer().set(UUID_NAMESPACEDKEY, PersistentDataType.STRING, friend.getUniqueId().toString()); - if (meta instanceof SkullMeta) inv.dynamicallyUpdateItem(this, n, disp, current -> { ((SkullMeta) meta).setOwningPlayer(friend);