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;
|
boolean donorFound = false;
|
||||||
for (TradeOffer tradeOffer: donorHeadShop.getOffers()) {
|
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;
|
donorFound = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue