diff --git a/src/main/java/ca/tweetzy/auctionhouse/auction/AuctionPlayer.java b/src/main/java/ca/tweetzy/auctionhouse/auction/AuctionPlayer.java index 5e359b4..4949c7c 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/auction/AuctionPlayer.java +++ b/src/main/java/ca/tweetzy/auctionhouse/auction/AuctionPlayer.java @@ -67,6 +67,9 @@ public class AuctionPlayer { } public boolean canListItem() { + if (this.player == null) + this.player = Bukkit.getPlayer(this.uuid); + if (Settings.LIST_ITEM_DELAY.getInt() == -1) { return true; } @@ -87,6 +90,9 @@ public class AuctionPlayer { } public List getItems(boolean getExpired) { + if (this.player == null) + this.player = Bukkit.getPlayer(this.uuid); + final List items = new ArrayList<>(); final AuctionHouse instance = AuctionHouse.getInstance(); for (Map.Entry entry : instance.getAuctionItemManager().getItems().entrySet()) { @@ -123,6 +129,9 @@ public class AuctionPlayer { } public int getAllowedSellTime(AuctionSaleType auctionSaleType) { + if (this.player == null) + this.player = Bukkit.getPlayer(this.uuid); + List possibleTimes = new ArrayList<>(); Settings.AUCTION_TIME.getStringList().forEach(line -> { String[] split = line.split(":");