adding config to check maximum profit before buying items so it can prevent duped items
This commit is contained in:
parent
7f9af48312
commit
9a956c6d9a
2 changed files with 12 additions and 0 deletions
|
@ -21,6 +21,8 @@ public class AHConfig extends Config {
|
|||
addListener("ONLY_SNIPER", () -> ConfigUtils.writeBooleanConfig("main", "OnlySniper", AHConfig.ONLY_SNIPER));
|
||||
addListener("CHECK_PERCENTAGE", () -> ConfigUtils.writeBooleanConfig("main", "checkProfitPercentageBeforeBuy", AHConfig.CHECK_PERCENTAGE));
|
||||
addListener("MINIMUM_PROFIT_PERCENTAGE", () -> ConfigUtils.writeIntConfig("main", "MinimumProfitPercentage", Math.round(AHConfig.MINIMUM_PROFIT_PERCENTAGE)));
|
||||
addListener("CHECK_MAXIMAL_PROFIT", () -> ConfigUtils.writeBooleanConfig("main", "checkMaxiumProfitPercentageBeforeBuy", AHConfig.CHECK_MAXIMUM_PROFIT));
|
||||
addListener("MAXIMUM_PROFIT_PERCENTAGE", () -> ConfigUtils.writeIntConfig("main", "MaximumProfitPercentage", AHConfig.MAXIMUM_PROFIT_PERCENTAGE));
|
||||
addListener("GUI", () -> ConfigUtils.writeBooleanConfig("main", "GUI", AHConfig.GUI));
|
||||
addListener("GUI_COLOR", () -> ConfigUtils.writeIntConfig("main", "GUI_COLOR", AHConfig.GUI_COLOR.getRGB()));
|
||||
addListener("ITEM_1_NAME", () -> ConfigUtils.writeStringConfig("item1", "Name", AHConfig.ITEM_1_NAME));
|
||||
|
@ -68,6 +70,12 @@ public class AHConfig extends Config {
|
|||
@Number(name = "Minimum Profit Percentage", min = 100, max = 5000, step = 50, category = "Flipper", description = "Profit percentage to check before buying the item, if the profit percentage is too low, it will not buy the item")
|
||||
public static int MINIMUM_PROFIT_PERCENTAGE = 400;
|
||||
|
||||
@Switch(name = "Check Maximum Profit Before Buying", category = "Flipper", description = "Check the maximal profit before buying the item, if the maximal profit is too high, it will not buy the item (Can prevent duped items)")
|
||||
public static boolean CHECK_MAXIMUM_PROFIT = false;
|
||||
|
||||
@Number(name = "Maximum Profit Percentage", min = 1000, max = 10000, step = 1000, category = "Flipper", description = "Maximum profit to check before buying the item, if the maximal profit is too high, it will not buy the item (Can prevent duped items)")
|
||||
public static int MAXIMUM_PROFIT_PERCENTAGE = 1000;
|
||||
|
||||
@Checkbox(name = "GUI", category = "GUI", description = "Enable the GUI")
|
||||
public static boolean GUI = true;
|
||||
|
||||
|
|
|
@ -32,6 +32,10 @@ public class ConfigUtils {
|
|||
if (hasNoKey("main", "OnlySniper")) writeBooleanConfig("main", "OnlySniper", false);
|
||||
if (hasNoKey("main", "checkProfitPercentageBeforeBuy"))
|
||||
writeBooleanConfig("main", "checkProfitPercentageBeforeBuy", false);
|
||||
if (hasNoKey("main", "checkMaxiumProfitPercentageBeforeBuy"))
|
||||
writeBooleanConfig("main", "checkMaxiumProfitPercentageBeforeBuy", false);
|
||||
if (hasNoKey("main", "MaximumProfitPercentage"))
|
||||
writeIntConfig("main", "MaximumProfitPercentage", 1000); //1000%
|
||||
if (hasNoKey("main", "MinimumProfitPercentage")) writeIntConfig("main", "MinimumProfitPercentage", 400); //400%
|
||||
if (hasNoKey("main", "GUI")) writeBooleanConfig("main", "GUI", true);
|
||||
if (hasNoKey("main", "GUI_COLOR")) writeIntConfig("main", "GUI_COLOR", 0x003153);
|
||||
|
|
Loading…
Reference in a new issue