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 AuctionedItem auctionItem;
|
||||||
private AuctionSaleType saleType;
|
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);
|
super(async);
|
||||||
this.originalOwner = originalOwner;
|
this.originalOwner = originalOwner;
|
||||||
this.buyer = buyer;
|
this.buyer = buyer;
|
||||||
this.auctionItem = auctionItem;
|
this.auctionItem = auctionItem;
|
||||||
this.saleType = saleType;
|
this.saleType = saleType;
|
||||||
|
this.tax = tax;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AuctionEndEvent(OfflinePlayer originalOwner, OfflinePlayer buyer, AuctionedItem auctionItem, AuctionSaleType saleType) {
|
public AuctionEndEvent(OfflinePlayer originalOwner, OfflinePlayer buyer, AuctionedItem auctionItem, AuctionSaleType saleType, double tax) {
|
||||||
this(originalOwner, buyer, auctionItem, saleType, true);
|
this(originalOwner, buyer, auctionItem, saleType, tax, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
|
@ -127,7 +127,7 @@ public class GUIConfirmPurchase extends AbstractPlaceholderGui {
|
|||||||
return;
|
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);
|
Bukkit.getServer().getPluginManager().callEvent(auctionEndEvent);
|
||||||
if (auctionEndEvent.isCancelled()) return;
|
if (auctionEndEvent.isCancelled()) return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user