mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-01-21 15:01:19 +01:00
🪲 Fixed transaction final price
Took 2 minutes
This commit is contained in:
parent
14af0816e4
commit
fa965583d4
@ -92,6 +92,12 @@ public class AuctionListeners implements Listener {
|
||||
AuctionHouse.newChain().async(() -> {
|
||||
if (Settings.RECORD_TRANSACTIONS.getBoolean()) {
|
||||
final AuctionHouse instance = AuctionHouse.getInstance();
|
||||
|
||||
double price = auctionedItem.getBasePrice();
|
||||
if (e.getSaleType() == AuctionSaleType.USED_BIDDING_SYSTEM) {
|
||||
price = auctionedItem.getCurrentPrice();
|
||||
}
|
||||
|
||||
instance.getDataManager().insertTransactionAsync(new Transaction(
|
||||
UUID.randomUUID(),
|
||||
originalOwnerUUID,
|
||||
@ -101,7 +107,7 @@ public class AuctionListeners implements Listener {
|
||||
System.currentTimeMillis(),
|
||||
auctionedItem.getItem(),
|
||||
e.getSaleType(),
|
||||
auctionedItem.getCurrentPrice()
|
||||
price
|
||||
), (error, transaction) -> {
|
||||
if (error == null) {
|
||||
instance.getTransactionManager().addTransaction(transaction);
|
||||
|
Loading…
Reference in New Issue
Block a user