forked from Upstream/mmocore
Fixed issue #795 about bugs linked to the party GUI.
This commit is contained in:
parent
d1be5cbce7
commit
ebed0d3983
@ -144,11 +144,10 @@ public class EditableFriendList extends EditableInventory {
|
|||||||
if (inv.getPlayerData().getFriends().size() <= n)
|
if (inv.getPlayerData().getFriends().size() <= n)
|
||||||
return super.display(inv, 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);
|
ItemStack disp = (friend.isOnline() ? online : offline).display(inv, n);
|
||||||
ItemMeta meta = disp.getItemMeta();
|
ItemMeta meta = disp.getItemMeta();
|
||||||
meta.getPersistentDataContainer().set(UUID_NAMESPACEDKEY, PersistentDataType.STRING, friend.getUniqueId().toString());
|
meta.getPersistentDataContainer().set(UUID_NAMESPACEDKEY, PersistentDataType.STRING, friend.getUniqueId().toString());
|
||||||
|
|
||||||
if (meta instanceof SkullMeta)
|
if (meta instanceof SkullMeta)
|
||||||
inv.dynamicallyUpdateItem(this, n, disp, current -> {
|
inv.dynamicallyUpdateItem(this, n, disp, current -> {
|
||||||
((SkullMeta) meta).setOwningPlayer(friend);
|
((SkullMeta) meta).setOwningPlayer(friend);
|
||||||
|
Loading…
Reference in New Issue
Block a user