mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-22 05:25:11 +01:00
formatting
This commit is contained in:
parent
7b290afcdb
commit
88a3643707
@ -1,5 +1,6 @@
|
||||
package ca.tweetzy.auctionhouse;
|
||||
|
||||
import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
|
||||
import ca.tweetzy.auctionhouse.commands.CommandActive;
|
||||
import ca.tweetzy.auctionhouse.commands.CommandAuctionHouse;
|
||||
import ca.tweetzy.auctionhouse.commands.CommandExpired;
|
||||
@ -80,7 +81,7 @@ public class AuctionHouse extends TweetyPlugin {
|
||||
|
||||
// auction players
|
||||
this.auctionPlayerManager = new AuctionPlayerManager();
|
||||
// Bukkit.getOnlinePlayers().forEach(p -> this.auctionPlayerManager.addSpeedyPlayer(p));
|
||||
Bukkit.getOnlinePlayers().forEach(p -> this.auctionPlayerManager.addPlayer(new AuctionPlayer(p)));
|
||||
|
||||
// load auction items
|
||||
this.auctionItemManager = new AuctionItemManager();
|
||||
|
@ -174,7 +174,7 @@ public class AuctionAPI {
|
||||
.addField(Settings.DISCORD_MSG_FIELD_FINAL_PRICE_NAME.getString(), isNew ? "Not Sold" : Settings.DISCORD_MSG_FIELD_FINAL_PRICE_VALUE.getString().replace("%final_price%", this.getFriendlyNumber(isBid ? auctionItem.getCurrentPrice() : auctionItem.getBasePrice())), Settings.DISCORD_MSG_FIELD_FINAL_PRICE_INLINE.getBoolean())
|
||||
.addField(Settings.DISCORD_MSG_FIELD_IS_BID_NAME.getString(), Settings.DISCORD_MSG_FIELD_IS_BID_VALUE.getString().replace("%is_bid%", String.valueOf(isBid)), Settings.DISCORD_MSG_FIELD_IS_BID_INLINE.getBoolean())
|
||||
.addField(Settings.DISCORD_MSG_FIELD_PURCHASE_TYPE_NAME.getString(), isNew ? "Was not bought" : Settings.DISCORD_MSG_FIELD_PURCHASE_TYPE_VALUE.getString().replace("%purchase_type%", saleType == AuctionSaleType.USED_BIDDING_SYSTEM ? "Won Bid" : "Bought Immediately"), Settings.DISCORD_MSG_FIELD_PURCHASE_INLINE.getBoolean())
|
||||
.addField(Settings.DISCORD_MSG_FIELD_ITEM_NAME.getString(), auctionItem.getItemName(), Settings.DISCORD_MSG_FIELD_ITEM_INLINE.getBoolean())
|
||||
.addField(Settings.DISCORD_MSG_FIELD_ITEM_NAME.getString(), Settings.DISCORD_MSG_FIELD_ITEM_VALUE.getString().replace("%item_name%", auctionItem.getItemName()), Settings.DISCORD_MSG_FIELD_ITEM_INLINE.getBoolean())
|
||||
.addField(Settings.DISCORD_MSG_FIELD_ITEM_AMOUNT_NAME.getString(), Settings.DISCORD_MSG_FIELD_ITEM_AMOUNT_VALUE.getString().replace("%item_amount%", String.valueOf(this.deserializeItem(auctionItem.getRawItem()).getAmount())), Settings.DISCORD_MSG_FIELD_ITEM_AMOUNT_INLINE.getBoolean())
|
||||
);
|
||||
|
||||
|
@ -63,7 +63,7 @@ public class CommandSell extends AbstractCommand {
|
||||
});
|
||||
|
||||
// get the max allowed time for this player.
|
||||
int allowedTime = possibleTimes.size() <= 0 ? Settings.DEFAULT_AUCTION_TIME.getInt() : Collections.max(possibleTimes);
|
||||
int allowedTime = possibleTimes.size() <= 0 ? Settings.DEFAULT_AUCTION_TIME.getInt() : Math.max(Settings.DEFAULT_AUCTION_TIME.getInt(), Collections.max(possibleTimes));
|
||||
|
||||
// check if player is at their selling limit
|
||||
if (auctionPlayer.isAtSellLimit()) {
|
||||
|
@ -23,7 +23,7 @@ public class Settings {
|
||||
/* ===============================
|
||||
* BASIC SETTINGS
|
||||
* ===============================*/
|
||||
public static final ConfigSetting DEFAULT_AUCTION_TIME = new ConfigSetting(config, "auction setting.default auction house", 900, "The default auction time before an item expires (in seconds)");
|
||||
public static final ConfigSetting DEFAULT_AUCTION_TIME = new ConfigSetting(config, "auction setting.default auction house", 60, "The default auction time before an item expires (in seconds)");
|
||||
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.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.");
|
||||
@ -61,11 +61,11 @@ public class Settings {
|
||||
public static final ConfigSetting DISCORD_MSG_FIELD_BUYER_INLINE = new ConfigSetting(config, "discord.msg.buyer.inline", true);
|
||||
|
||||
public static final ConfigSetting DISCORD_MSG_FIELD_BUY_NOW_PRICE_NAME = new ConfigSetting(config, "discord.msg.buy now price.name", "Buy Now Price");
|
||||
public static final ConfigSetting DISCORD_MSG_FIELD_BUY_NOW_PRICE_VALUE = new ConfigSetting(config, "discord.msg.buy now price.value", "%buy_now_price%");
|
||||
public static final ConfigSetting DISCORD_MSG_FIELD_BUY_NOW_PRICE_VALUE = new ConfigSetting(config, "discord.msg.buy now price.value", "$%buy_now_price%");
|
||||
public static final ConfigSetting DISCORD_MSG_FIELD_BUY_NOW_PRICE_INLINE = new ConfigSetting(config, "discord.msg.buy now price.inline", true);
|
||||
|
||||
public static final ConfigSetting DISCORD_MSG_FIELD_FINAL_PRICE_NAME = new ConfigSetting(config, "discord.msg.final price.name", "Final Price");
|
||||
public static final ConfigSetting DISCORD_MSG_FIELD_FINAL_PRICE_VALUE = new ConfigSetting(config, "discord.msg.final price.value", "%final_price%");
|
||||
public static final ConfigSetting DISCORD_MSG_FIELD_FINAL_PRICE_VALUE = new ConfigSetting(config, "discord.msg.final price.value", "$%final_price%");
|
||||
public static final ConfigSetting DISCORD_MSG_FIELD_FINAL_PRICE_INLINE = new ConfigSetting(config, "discord.msg.final price.inline", true);
|
||||
|
||||
public static final ConfigSetting DISCORD_MSG_FIELD_IS_BID_NAME = new ConfigSetting(config, "discord.msg.is bid.name", "Was Bid");
|
||||
@ -92,7 +92,7 @@ public class Settings {
|
||||
/* ===============================
|
||||
* MAX AUCTION TIME
|
||||
* ===============================*/
|
||||
public static final ConfigSetting AUCTION_TIME = new ConfigSetting(config, "auction time", Collections.singletonList("rankone:1200"), "Special time permissions for users.", "If they have the following permission in this format:", "auctionhouse.time.rankone", "rankone refers to the list item under auction time, they will get the time specified (in seconds)");
|
||||
public static final ConfigSetting AUCTION_TIME = new ConfigSetting(config, "auction time", Collections.singletonList("rankone:30"), "Special time permissions for users.", "If they have the following permission in this format:", "auctionhouse.time.rankone", "rankone refers to the list item under auction time, they will get the time specified (in seconds)");
|
||||
|
||||
/* ===============================
|
||||
* GLOBAL ITEMS
|
||||
|
Loading…
Reference in New Issue
Block a user