From 1b5c8625de64504153526e54ea071a6635d49dca Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Fri, 6 Aug 2021 21:33:40 -0600 Subject: [PATCH] Use UUID instead of display name to determine if a player is in the shop --- src/main/java/xyz/etztech/qol/listeners/JoinListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/xyz/etztech/qol/listeners/JoinListener.java b/src/main/java/xyz/etztech/qol/listeners/JoinListener.java index 104af5f..8fccdcf 100644 --- a/src/main/java/xyz/etztech/qol/listeners/JoinListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/JoinListener.java @@ -82,7 +82,8 @@ public class JoinListener implements Listener { boolean donorFound = false; for (TradeOffer tradeOffer: donorHeadShop.getOffers()) { - if (tradeOffer.getResultItem().getItemMeta().getDisplayName().equals(player.getDisplayName())) { + SkullMeta itemOfferMeta = (SkullMeta)tradeOffer.getResultItem().getItemMeta(); + if (itemOfferMeta.getOwningPlayer().getUniqueId() == player.getUniqueId()) { donorFound = true; break; }