mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-30 06:43:40 +01:00
parent
e6f28af4a0
commit
b5e7fa0720
@ -731,7 +731,7 @@ public class AuctionAPI {
|
||||
AuctionHouse.getInstance().getLocale().getMessage("pricing.moneyremove").processPlaceholder("player_balance", AuctionAPI.getInstance().formatNumber(EconomyManager.getBalance(seller))).processPlaceholder("price", AuctionAPI.getInstance().formatNumber(calculateListingFee(basePrice))).sendPrefixedMessage(seller);
|
||||
}
|
||||
|
||||
AuctionStartEvent startEvent = new AuctionStartEvent(seller, auctionedItem);
|
||||
AuctionStartEvent startEvent = new AuctionStartEvent(seller, auctionedItem, Settings.TAX_ENABLED.getBoolean() && Settings.TAX_CHARGE_LISTING_FEE.getBoolean() ? calculateListingFee(basePrice) : 0D);
|
||||
Bukkit.getServer().getPluginManager().callEvent(startEvent);
|
||||
if (startEvent.isCancelled()) return;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package ca.tweetzy.auctionhouse.api.events;
|
||||
|
||||
import ca.tweetzy.auctionhouse.auction.AuctionedItem;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.Event;
|
||||
@ -12,6 +13,7 @@ import org.bukkit.event.HandlerList;
|
||||
* Time Created: 4:59 p.m.
|
||||
* Usage of any code found within this class is prohibited unless given explicit permission otherwise
|
||||
*/
|
||||
@Getter
|
||||
public class AuctionStartEvent extends Event implements Cancellable {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@ -20,17 +22,12 @@ public class AuctionStartEvent extends Event implements Cancellable {
|
||||
private Player seller;
|
||||
private AuctionedItem auctionItem;
|
||||
|
||||
public AuctionStartEvent(Player seller, AuctionedItem auctionItem) {
|
||||
private double listingTax;
|
||||
|
||||
public AuctionStartEvent(Player seller, AuctionedItem auctionItem, double listingTax) {
|
||||
this.seller = seller;
|
||||
this.auctionItem = auctionItem;
|
||||
}
|
||||
|
||||
public Player getSeller() {
|
||||
return seller;
|
||||
}
|
||||
|
||||
public AuctionedItem getAuctionItem() {
|
||||
return auctionItem;
|
||||
this.listingTax = listingTax;
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
|
Loading…
Reference in New Issue
Block a user