another npe fix

This commit is contained in:
Ryder Belserion 2024-10-31 12:08:11 -04:00
parent 34309a50a9
commit d80b9d75ce
No known key found for this signature in database

View File

@ -148,6 +148,11 @@ public class CurrentMenu extends Holder {
} }
} }
// return early, fixes npe
if (!container.has(Keys.auction_store_id.getNamespacedKey())) {
return;
}
final UUID uuid = player.getUniqueId(); final UUID uuid = player.getUniqueId();
final AuctionItem auction = this.userManager.getAuctionItemById(uuid, container.getOrDefault(Keys.auction_store_id.getNamespacedKey(), PersistentDataType.STRING, "")); final AuctionItem auction = this.userManager.getAuctionItemById(uuid, container.getOrDefault(Keys.auction_store_id.getNamespacedKey(), PersistentDataType.STRING, ""));