add meetsListingRequirements to sell auction / bin guis. Closes #33

Took 2 minutes
This commit is contained in:
Kiran Hart 2023-01-02 13:41:55 -05:00
parent 5160de0f29
commit 5b775f520e
No known key found for this signature in database
GPG Key ID: 5F36C7BC79D3EBC3
2 changed files with 4 additions and 0 deletions

View File

@ -333,6 +333,8 @@ public final class GUISellAuction extends AbstractPlaceholderGui {
}
private void performAuctionListing(GuiClickEvent click) {
if (!AuctionAPI.getInstance().meetsListingRequirements(click.player, this.auctionPlayer.getItemBeingListed())) return;
AuctionCreator.create(this.auctionPlayer, createListingItem(), (originalListing, listingResult) -> {
if (listingResult != ListingResult.SUCCESS) {
click.player.closeInventory();

View File

@ -207,6 +207,8 @@ public final class GUISellBin extends AbstractPlaceholderGui {
}
private void performAuctionListing(GuiClickEvent click) {
if (!AuctionAPI.getInstance().meetsListingRequirements(click.player, this.auctionPlayer.getItemBeingListed())) return;
AuctionCreator.create(this.auctionPlayer, createListingItem(), (originalListing, listingResult) -> {
if (listingResult != ListingResult.SUCCESS) {
click.player.closeInventory();