mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-01-08 12:57:35 +01:00
fixed bug with the auction end system.
This commit is contained in:
parent
c2c1846511
commit
5181f1cd9c
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>ca.tweetzy</groupId>
|
||||
<artifactId>auctionhouse</artifactId>
|
||||
<version>2.17.0</version>
|
||||
<version>2.17.1</version>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
@ -82,6 +82,7 @@ public class GUIActiveAuctions extends Gui {
|
||||
case RIGHT:
|
||||
if (Settings.ALLOW_PLAYERS_TO_ACCEPT_BID.getBoolean() && item.getBidStartPrice() != 0 && !item.getHighestBidder().equals(e.player.getUniqueId())) {
|
||||
item.setRemainingTime(0);
|
||||
draw();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class TickAuctionsTask extends BukkitRunnable {
|
||||
}
|
||||
|
||||
if (auctionItem.getRemainingTime() <= 0) {
|
||||
if (auctionItem.getOwner().equals(auctionItem.getHighestBidder())) {
|
||||
if (auctionItem.getHighestBidder().equals(auctionItem.getOwner())) {
|
||||
auctionItem.setExpired(true);
|
||||
continue;
|
||||
}
|
||||
@ -67,7 +67,8 @@ public class TickAuctionsTask extends BukkitRunnable {
|
||||
|
||||
AuctionEndEvent auctionEndEvent = new AuctionEndEvent(Bukkit.getOfflinePlayer(auctionItem.getOwner()), auctionWinner, auctionItem, AuctionSaleType.USED_BIDDING_SYSTEM);
|
||||
AuctionHouse.getInstance().getServer().getPluginManager().callEvent(auctionEndEvent);
|
||||
if (!auctionEndEvent.isCancelled()) continue;
|
||||
if (auctionEndEvent.isCancelled()) continue;
|
||||
|
||||
|
||||
AuctionHouse.getInstance().getEconomyManager().withdrawPlayer(auctionWinner, auctionItem.getCurrentPrice());
|
||||
AuctionHouse.getInstance().getEconomyManager().depositPlayer(Bukkit.getOfflinePlayer(auctionItem.getOwner()), auctionItem.getCurrentPrice());
|
||||
|
Loading…
Reference in New Issue
Block a user