From f035881b2a41d3bc3f0ea01a2a328ea06b282706 Mon Sep 17 00:00:00 2001 From: Reasel Date: Fri, 27 Apr 2018 03:37:34 -0700 Subject: [PATCH] Add ability to disable HP and Prayer notifications (#2007) - Change default HP and Prayer threshold to 0 - When threshold is 0, don't send notification - Add description how to disable/enable pray/hp notifications --- .../client/plugins/idlenotifier/IdleNotifierConfig.java | 8 ++++---- .../client/plugins/idlenotifier/IdleNotifierPlugin.java | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierConfig.java index 429a64862c..cf877eb45d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierConfig.java @@ -71,22 +71,22 @@ public interface IdleNotifierConfig extends Config @ConfigItem( keyName = "hitpoints", name = "Hitpoints Notification Threshold", - description = "The amount of hitpoints to send a notification at", + description = "The amount of hitpoints to send a notification at. A value of 0 will disable notification.", position = 4 ) default int getHitpointsThreshold() { - return 15; + return 0; } @ConfigItem( keyName = "prayer", name = "Prayer Notification Threshold", - description = "The amount of prayer points to send a notification at", + description = "The amount of prayer points to send a notification at. A value of 0 will disable notification.", position = 5 ) default int getPrayerThreshold() { - return 15; + return 0; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierPlugin.java index c39cacc368..aad1031611 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierPlugin.java @@ -251,6 +251,10 @@ public class IdleNotifierPlugin extends Plugin private boolean checkLowHitpoints() { + if (config.getHitpointsThreshold() == 0) + { + return false; + } if (client.getRealSkillLevel(Skill.HITPOINTS) > config.getHitpointsThreshold()) { if (client.getBoostedSkillLevel(Skill.HITPOINTS) <= config.getHitpointsThreshold()) @@ -272,6 +276,10 @@ public class IdleNotifierPlugin extends Plugin private boolean checkLowPrayer() { + if (config.getPrayerThreshold() == 0) + { + return false; + } if (client.getRealSkillLevel(Skill.PRAYER) > config.getPrayerThreshold()) { if (client.getBoostedSkillLevel(Skill.PRAYER) <= config.getPrayerThreshold())