2.54.0 - number round option

This commit is contained in:
Kiran Hart 2022-01-24 12:50:05 -05:00
parent e5b69121d0
commit a3d0279af5
3 changed files with 8 additions and 5 deletions

View File

@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>ca.tweetzy</groupId>
<artifactId>auctionhouse</artifactId>
<version>2.53.2</version>
<version>2.54.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View File

@ -650,10 +650,12 @@ public class AuctionAPI {
auctionedItem.setExpiresAt(System.currentTimeMillis() + 1000L * seconds);
auctionedItem.setBidItem(isBiddingItem);
auctionedItem.setExpired(false);
auctionedItem.setBasePrice(basePrice);
auctionedItem.setBidStartingPrice(bidStartPrice);
auctionedItem.setBidIncrementPrice(bidIncPrice);
auctionedItem.setCurrentPrice(currentPrice);
auctionedItem.setBasePrice(Settings.ROUND_ALL_PRICES.getBoolean() ? Math.round(basePrice) : basePrice);
auctionedItem.setBidStartingPrice(Settings.ROUND_ALL_PRICES.getBoolean() ? Math.round(bidStartPrice) : bidStartPrice);
auctionedItem.setBidIncrementPrice(Settings.ROUND_ALL_PRICES.getBoolean() ? Math.round(bidIncPrice) : bidIncPrice);
auctionedItem.setCurrentPrice(Settings.ROUND_ALL_PRICES.getBoolean() ? Math.round(currentPrice) : currentPrice);
auctionedItem.setListedWorld(seller.getWorld().getName());
auctionedItem.setInfinite(isInfinite);

View File

@ -56,6 +56,7 @@ public class Settings {
public static final ConfigSetting SYNCHRONIZE_ITEM_ADD = new ConfigSetting(config, "auction setting.synchronize item add", false, "If an item is being added to a player's inventory, the process will be ran synchronously");
public static final ConfigSetting ITEM_COPY_REQUIRES_GMC = new ConfigSetting(config, "auction setting.admin copy requires creative", false, "If true when using the admin copy option the player must be in creative");
public static final ConfigSetting LOG_ADMIN_ACTIONS = new ConfigSetting(config, "auction setting.log admin actions", true, "If true, any admin actions made will be logged");
public static final ConfigSetting ROUND_ALL_PRICES = new ConfigSetting(config, "auction setting.round all prices", false, "If true, any decimal numbers will be rounded to the nearest whole number");
public static final ConfigSetting TICK_UPDATE_TIME = new ConfigSetting(config, "auction setting.tick auctions every", 1, "How many seconds should pass before the plugin updates all the times on items?");
public static final ConfigSetting CLAIM_MS_DELAY = new ConfigSetting(config, "auction setting.item claim delay", 100, "How many ms should a player wait before being allowed to claim an item?, Ideally you don't wanna change this. It's meant to prevent auto clicker dupe claims");