run bid event async in main auction gui

Took 20 seconds
This commit is contained in:
Kiran Hart 2023-01-02 13:31:27 -05:00
parent 89c3a6001a
commit 70c1cbd682
No known key found for this signature in database
GPG Key ID: 5F36C7BC79D3EBC3

View File

@ -315,7 +315,7 @@ public class GUIAuctionHouse extends AbstractPlaceholderGui {
OfflinePlayer oldBidder = Bukkit.getOfflinePlayer(auctionItem.getHighestBidder());
OfflinePlayer owner = Bukkit.getOfflinePlayer(auctionItem.getOwner());
AuctionBidEvent auctionBidEvent = new AuctionBidEvent(e.player, auctionItem, newBiddingAmount);
AuctionBidEvent auctionBidEvent = new AuctionBidEvent(e.player, auctionItem, newBiddingAmount, true);
Bukkit.getServer().getPluginManager().callEvent(auctionBidEvent);
if (auctionBidEvent.isCancelled()) return true;