boosts: Add option to disable boost threshold notifications (#11668)
Co-authored-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -103,12 +103,23 @@ public interface BoostsConfig extends Config
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "boostThreshold",
|
||||
name = "Boost Amount Threshold",
|
||||
description = "The amount of levels boosted to send a notification at. A value of 0 will disable notification.",
|
||||
name = "Boost amount threshold",
|
||||
description = "The amount of levels boosted to display then in different color. A value of 0 will disable the feature.",
|
||||
position = 6
|
||||
)
|
||||
default int boostThreshold()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "notifyOnBoost",
|
||||
name = "Notify on boost threshold",
|
||||
description = "Configures whether or not a notification will be sent for boosted stats.",
|
||||
position = 7
|
||||
)
|
||||
default boolean notifyOnBoost()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ public class BoostsPlugin extends Plugin
|
||||
|
||||
int boostThreshold = config.boostThreshold();
|
||||
|
||||
if (boostThreshold != 0)
|
||||
if (boostThreshold != 0 && config.notifyOnBoost())
|
||||
{
|
||||
int real = client.getRealSkillLevel(skill);
|
||||
int lastBoost = last - real;
|
||||
|
||||
Reference in New Issue
Block a user