💨 Fixed bug when force custom bid amount is enabled, clicking to bid on an item would essentially just do nothing

Took 34 seconds
This commit is contained in:
Kiran Hart 2023-02-23 13:13:26 -05:00
parent fc6574efb9
commit 0023205147
No known key found for this signature in database
GPG Key ID: 5F36C7BC79D3EBC3
2 changed files with 3 additions and 1 deletions

View File

@ -583,7 +583,6 @@ public class DataManager extends DataManagerAbstract {
public void updateAuctionPlayer(@NonNull final AuctionPlayer auctionPlayer, Callback<Boolean> callback) {
this.thread.execute(() -> this.databaseConnector.connect(connection -> {
try (PreparedStatement statement = connection.prepareStatement("UPDATE " + this.getTablePrefix() + "player SET filter_sale_type = ?, filter_item_category = ?, filter_sort_type = ?, last_listed_item = ? WHERE uuid = ?")) {
statement.setString(1, auctionPlayer.getSelectedSaleType().name());
statement.setString(2, auctionPlayer.getSelectedFilter().name());
statement.setString(3, auctionPlayer.getAuctionSortType().name());

View File

@ -305,6 +305,7 @@ public class GUIAuctionHouse extends AbstractPlaceholderGui {
if (Settings.PLAYER_NEEDS_TOTAL_PRICE_TO_BID.getBoolean() && !EconomyManager.hasBalance(e.player, newBiddingAmount)) {
AuctionHouse.getInstance().getLocale().getMessage("general.notenoughmoney").sendPrefixedMessage(e.player);
AuctionHouse.getInstance().getGuiManager().showGUI(player, new GUIAuctionHouse(GUIAuctionHouse.this.auctionPlayer));
return true;
}
@ -388,6 +389,8 @@ public class GUIAuctionHouse extends AbstractPlaceholderGui {
return true;
}
};
return;
}
e.manager.showGUI(e.player, new GUIBid(this.auctionPlayer, auctionItem));