// Path: src/main/java/edu/self/startux/craftBay/event/AuctionCreateEvent.java
// public class AuctionCreateEvent extends AuctionEvent {
//         private static HandlerList handlers = new HandlerList();
// 
//         public AuctionCreateEvent(Auction auction) {
//                 super(auction);
//         }
// 
//         public static HandlerList getHandlerList() {
//                 return handlers;
//         }
// 
//         @Override
//         public HandlerList getHandlers() {
//                 return handlers;
//         }
// }
// 
// Path: src/main/java/edu/self/startux/craftBay/event/AuctionEndEvent.java
// public class AuctionEndEvent extends AuctionEvent {
//         private static HandlerList handlers = new HandlerList();
//         private boolean paymentError = false;
// 
//         public AuctionEndEvent(Auction auction) {
//                 super(auction);
//         }
// 
//         public static HandlerList getHandlerList() {
//                 return handlers;
//         }
// 
//         @Override
//         public HandlerList getHandlers() {
//                 return handlers;
//         }
// 
//         public void setPaymentError(boolean paymentError) {
//                 this.paymentError = paymentError;
//         }
// 
//         public boolean hasPaymentError() {
//                 return paymentError;
//         }
// }


import edu.self.startux.craftBay.event.AuctionCreateEvent;
import edu.self.startux.craftBay.event.AuctionEndEvent;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
        }
        if (!plugin.getAuctionScheduler().canQueue()) {
            owner.warn(plugin.getMessage("auction.create.QueueFull").set(owner));
            return null;
        }
        double fee = 0.0;
        double tax = 0.0;
        if (!owner.hasPermission("auction.nofee")) fee = plugin.getConfig().getDouble("auctionfee");
        if (!owner.hasPermission("auction.notax") && startingBid.getDouble() > plugin.getConfig().getDouble("startingbid")) {
            tax = (plugin.getConfig().getDouble("auctiontax") * (startingBid.getDouble() - plugin.getConfig().getDouble("startingbid"))) / 100.0;
        }
        MoneyAmount feetax = new MoneyAmount(fee + tax);
        if (feetax.getDouble() > 0.0) {
            if (!owner.hasAmount(feetax)) {
                owner.warn(plugin.getMessage("auction.create.FeeTooHigh").set(owner).set("fee", feetax));
                return null;
            }
            if (!owner.takeAmount(feetax, "Auction Tax")) {
                owner.warn(plugin.getMessage("auction.create.FeeTooHigh").set(owner).set("fee", feetax));
                return null;
            }
            owner.msg(plugin.getMessage("auction.create.FeeDebited").set(owner).set("fee", feetax));
        }
        touchCooldown(owner);
        // create
        Auction auction = new TimedAuction(plugin, owner, item);
        auction.setState(AuctionState.QUEUED);
        if (startingBid.getDouble() > 0) auction.setStartingBid(startingBid);
        auction.setFee(feetax);
        plugin.getAuctionScheduler().queueAuction(auction);
// Path: src/main/java/edu/self/startux/craftBay/event/AuctionCreateEvent.java
// public class AuctionCreateEvent extends AuctionEvent {
//         private static HandlerList handlers = new HandlerList();
// 
//         public AuctionCreateEvent(Auction auction) {
//                 super(auction);
//         }
// 
//         public static HandlerList getHandlerList() {
//                 return handlers;
//         }
// 
//         @Override
//         public HandlerList getHandlers() {
//                 return handlers;
//         }
// }
// 
// Path: src/main/java/edu/self/startux/craftBay/event/AuctionEndEvent.java
// public class AuctionEndEvent extends AuctionEvent {
//         private static HandlerList handlers = new HandlerList();
//         private boolean paymentError = false;
// 
//         public AuctionEndEvent(Auction auction) {
//                 super(auction);
//         }
// 
//         public static HandlerList getHandlerList() {
//                 return handlers;
//         }
// 
//         @Override
//         public HandlerList getHandlers() {
//                 return handlers;
//         }
// 
//         public void setPaymentError(boolean paymentError) {
//                 this.paymentError = paymentError;
//         }
// 
//         public boolean hasPaymentError() {
//                 return paymentError;
//         }
// }


// Path: src/main/java/edu/self/startux/craftBay/AuctionHouse.java
import edu.self.startux.craftBay.event.AuctionCreateEvent;
import edu.self.startux.craftBay.event.AuctionEndEvent;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

        }
        if (!plugin.getAuctionScheduler().canQueue()) {
            owner.warn(plugin.getMessage("auction.create.QueueFull").set(owner));
            return null;
        }
        double fee = 0.0;
        double tax = 0.0;
        if (!owner.hasPermission("auction.nofee")) fee = plugin.getConfig().getDouble("auctionfee");
        if (!owner.hasPermission("auction.notax") && startingBid.getDouble() > plugin.getConfig().getDouble("startingbid")) {
            tax = (plugin.getConfig().getDouble("auctiontax") * (startingBid.getDouble() - plugin.getConfig().getDouble("startingbid"))) / 100.0;
        }
        MoneyAmount feetax = new MoneyAmount(fee + tax);
        if (feetax.getDouble() > 0.0) {
            if (!owner.hasAmount(feetax)) {
                owner.warn(plugin.getMessage("auction.create.FeeTooHigh").set(owner).set("fee", feetax));
                return null;
            }
            if (!owner.takeAmount(feetax, "Auction Tax")) {
                owner.warn(plugin.getMessage("auction.create.FeeTooHigh").set(owner).set("fee", feetax));
                return null;
            }
            owner.msg(plugin.getMessage("auction.create.FeeDebited").set(owner).set("fee", feetax));
        }
        touchCooldown(owner);
        // create
        Auction auction = new TimedAuction(plugin, owner, item);
        auction.setState(AuctionState.QUEUED);
        if (startingBid.getDouble() > 0) auction.setStartingBid(startingBid);
        auction.setFee(feetax);
        plugin.getAuctionScheduler().queueAuction(auction);
        plugin.getServer().getPluginManager().callEvent(new AuctionCreateEvent(auction));