mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-26 06:05:25 +01:00
added option to filter where it would only look at whitelisted items
Took 3 minutes
This commit is contained in:
parent
ab2ff169a4
commit
c6a816bf8e
@ -159,6 +159,10 @@ public class GUIAuctionHouse extends AbstractPlaceholderGui {
|
||||
}
|
||||
|
||||
private boolean checkFilterCriteria(AuctionedItem auctionItem, AuctionItemCategory category) {
|
||||
// option for only whitelisted shit
|
||||
if (Settings.FILTER_ONLY_USES_WHITELIST.getBoolean())
|
||||
return AuctionHouse.getInstance().getFilterManager().getFilterWhitelist(category).stream().anyMatch(item -> item.isSimilar(auctionItem.getItem()));
|
||||
|
||||
return auctionItem.getCategory() == category ||
|
||||
AuctionHouse.getInstance().getFilterManager().getFilterWhitelist(category).stream().anyMatch(item -> item.isSimilar(auctionItem.getItem()));
|
||||
}
|
||||
|
@ -128,6 +128,7 @@ public class Settings {
|
||||
public static final ConfigSetting SMART_MIN_BUY_PRICE = new ConfigSetting(config, "auction setting.smart min and buy price", false, "Will calculate buy now/min prices on a per item basis. For example, if the user states $100 and the item is in a stack of", "32, the min / buy now price will be $3200. If they provide -s or -stack in the command", "this will be ignored and the entire stack will sell for $100");
|
||||
|
||||
public static final ConfigSetting USE_SEPARATE_FILTER_MENU = new ConfigSetting(config, "auction setting.use separate filter menu", false, "If true, rather than using a single filter item inside the auction menu", "it will open an entirely new menu to select the filter");
|
||||
public static final ConfigSetting FILTER_ONLY_USES_WHITELIST = new ConfigSetting(config, "auction setting.filter only uses whitelist", false, "If true, auction house will ignore default filters, and only filter by the items added to the category whitelists");
|
||||
public static final ConfigSetting SELL_MENU_REQUIRES_USER_TO_HOLD_ITEM = new ConfigSetting(config, "auction setting.require user to hold item when using sell menu", false, "If enabled, when running just /ah sell, the user will need to hold the item in their hand, otherwise they just add it in the gui.");
|
||||
public static final ConfigSetting OPEN_MAIN_AUCTION_HOUSE_AFTER_MENU_LIST = new ConfigSetting(config, "auction setting.open main auction house after listing using menu", true, "Should the main auction house be opened after the user lists an item using the sell menu?");
|
||||
public static final ConfigSetting SELL_MENU_CLOSE_SENDS_TO_LISTING = new ConfigSetting(config, "auction setting.sell menu close sends to listings", true, "If true, when the player clicks the close button within the sell menu, it will send them to the main auction house");
|
||||
|
Loading…
Reference in New Issue
Block a user