mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-26 06:05:25 +01:00
parent
411935aa57
commit
a71645f6b5
@ -28,16 +28,19 @@ public class AuctionEndEvent extends Event implements Cancellable {
|
||||
private AuctionedItem auctionItem;
|
||||
private AuctionSaleType saleType;
|
||||
|
||||
public AuctionEndEvent(OfflinePlayer originalOwner, OfflinePlayer buyer, AuctionedItem auctionItem, AuctionSaleType saleType, boolean async) {
|
||||
private double tax;
|
||||
|
||||
public AuctionEndEvent(OfflinePlayer originalOwner, OfflinePlayer buyer, AuctionedItem auctionItem, AuctionSaleType saleType, double tax, boolean async) {
|
||||
super(async);
|
||||
this.originalOwner = originalOwner;
|
||||
this.buyer = buyer;
|
||||
this.auctionItem = auctionItem;
|
||||
this.saleType = saleType;
|
||||
this.tax = tax;
|
||||
}
|
||||
|
||||
public AuctionEndEvent(OfflinePlayer originalOwner, OfflinePlayer buyer, AuctionedItem auctionItem, AuctionSaleType saleType) {
|
||||
this(originalOwner, buyer, auctionItem, saleType, true);
|
||||
public AuctionEndEvent(OfflinePlayer originalOwner, OfflinePlayer buyer, AuctionedItem auctionItem, AuctionSaleType saleType, double tax) {
|
||||
this(originalOwner, buyer, auctionItem, saleType, tax, true);
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
|
@ -127,7 +127,7 @@ public class GUIConfirmPurchase extends AbstractPlaceholderGui {
|
||||
return;
|
||||
}
|
||||
|
||||
AuctionEndEvent auctionEndEvent = new AuctionEndEvent(Bukkit.getOfflinePlayer(this.auctionItem.getOwner()), e.player, this.auctionItem, AuctionSaleType.WITHOUT_BIDDING_SYSTEM, false);
|
||||
AuctionEndEvent auctionEndEvent = new AuctionEndEvent(Bukkit.getOfflinePlayer(this.auctionItem.getOwner()), e.player, this.auctionItem, AuctionSaleType.WITHOUT_BIDDING_SYSTEM, tax, false);
|
||||
Bukkit.getServer().getPluginManager().callEvent(auctionEndEvent);
|
||||
if (auctionEndEvent.isCancelled()) return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user