From ab22082e387cf2c6853316ab8782cd9db91b2ef7 Mon Sep 17 00:00:00 2001 From: Tim van Rossum Date: Fri, 22 May 2020 21:58:22 +0200 Subject: [PATCH] boosts: Add option to disable boost threshold notifications (#11668) Co-authored-by: Tomas Slusny --- .../client/plugins/boosts/BoostsConfig.java | 15 +++++++++++++-- .../client/plugins/boosts/BoostsPlugin.java | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/boosts/BoostsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/boosts/BoostsConfig.java index a853ea41c3..5c9111bc06 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/boosts/BoostsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/boosts/BoostsConfig.java @@ -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; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/boosts/BoostsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/boosts/BoostsPlugin.java index 891006db43..c9fd49c97b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/boosts/BoostsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/boosts/BoostsPlugin.java @@ -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;