mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-01-21 15:01:19 +01:00
⌚ adjust default creation delay to 2 ticks, check if main thread b4 calling auction event
Took 3 minutes
This commit is contained in:
parent
e3a41dd64c
commit
44eeaf4090
@ -114,7 +114,12 @@ public final class AuctionCreator {
|
||||
auctionItem.setListedWorld(seller.getWorld().getName());
|
||||
|
||||
AuctionStartEvent startEvent = new AuctionStartEvent(seller, auctionItem, listingFee);
|
||||
Bukkit.getServer().getPluginManager().callEvent(startEvent);
|
||||
|
||||
if (Bukkit.isPrimaryThread())
|
||||
Bukkit.getServer().getPluginManager().callEvent(startEvent);
|
||||
else
|
||||
Bukkit.getScheduler().runTask(AuctionHouse.getInstance(), () -> Bukkit.getServer().getPluginManager().callEvent(startEvent));
|
||||
|
||||
if (startEvent.isCancelled()) {
|
||||
result.accept(auctionItem, EVENT_CANCELED);
|
||||
return;
|
||||
|
@ -54,7 +54,7 @@ public class Settings {
|
||||
* ===============================*/
|
||||
public static final ConfigSetting DEFAULT_BIN_LISTING_TIME = new ConfigSetting(config, "auction setting.listings times.bin item", 86400, "The default listing time for bin items (buy only items) before they expire");
|
||||
public static final ConfigSetting DEFAULT_AUCTION_LISTING_TIME = new ConfigSetting(config, "auction setting.listings times.auction item", 604800, "The default listing time for auction items before they expire");
|
||||
public static final ConfigSetting INTERNAL_CREATE_DELAY = new ConfigSetting(config, "auction setting.internal create delay", 3, "How many ticks should auction house wait before actually creating the item.");
|
||||
public static final ConfigSetting INTERNAL_CREATE_DELAY = new ConfigSetting(config, "auction setting.internal create delay", 2, "How many ticks should auction house wait before actually creating the item.");
|
||||
public static final ConfigSetting MAX_AUCTION_PRICE = new ConfigSetting(config, "auction setting.pricing.max auction price", 1000000000, "The max price for buy only / buy now items");
|
||||
public static final ConfigSetting MAX_AUCTION_START_PRICE = new ConfigSetting(config, "auction setting.pricing.max auction start price", 1000000000, "The max price starting a bidding auction");
|
||||
public static final ConfigSetting MAX_AUCTION_INCREMENT_PRICE = new ConfigSetting(config, "auction setting.pricing.max auction increment price", 1000000000, "The max amount for incrementing a bid.");
|
||||
|
Loading…
Reference in New Issue
Block a user