Use UUID instead of display name to determine if a player is in the shop

pull/18/head
Joey Hines 2021-08-06 21:33:40 -06:00
parent fe38a3978d
commit 1b5c8625de
No known key found for this signature in database
GPG Key ID: 80F567B5C968F91B
1 changed files with 2 additions and 1 deletions

View File

@ -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;
} }