Use UUID instead of display name to determine if a player is in the shop
parent
fe38a3978d
commit
1b5c8625de
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue