Remove notification settings from NMZ

Remove notification settings from NMZ that are now contained in
RuneLiteConfig.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-02-28 10:55:35 +01:00
parent 5f0f0c6836
commit a386dab3f2
2 changed files with 11 additions and 49 deletions

View File

@@ -37,23 +37,12 @@ import net.runelite.client.config.ConfigItem;
public interface NightmareZoneConfig extends Config
{
@ConfigItem(
keyName = "tray",
name = "Send Tray Notification",
description = "Toggles tray notifications",
keyName = "moveoverlay",
name = "Override NMZ overlay",
description = "Overrides the overlay so it doesn't conflict with other RuneLite plugins",
position = 1
)
default boolean sendTrayNotification()
{
return true;
}
@ConfigItem(
keyName = "request",
name = "Request Window Focus",
description = "Toggles window focus request",
position = 2
)
default boolean requestFocus()
default boolean moveOverlay()
{
return true;
}
@@ -62,29 +51,18 @@ public interface NightmareZoneConfig extends Config
keyName = "overloadnotification",
name = "Overload notification",
description = "Toggles notifications when your overload runs out",
position = 3
position = 2
)
default boolean overloadNotification()
{
return true;
}
@ConfigItem(
keyName = "moveoverlay",
name = "Override NMZ overlay",
description = "Overrides the overlay so it doesn't conflict with other RuneLite plugins",
position = 4
)
default boolean moveOverlay()
{
return true;
}
@ConfigItem(
keyName = "absorptionnotification",
name = "Absorption notification",
description = "Toggles notifications when your absorption points gets below your threshold",
position = 5
position = 3
)
default boolean absorptionNotification()
{
@@ -95,7 +73,7 @@ public interface NightmareZoneConfig extends Config
keyName = "absorptionthreshold",
name = "Absorption Threshold",
description = "The amount of absorption points to send a notification at",
position = 6
position = 4
)
default int absorptionThreshold()
{
@@ -106,7 +84,7 @@ public interface NightmareZoneConfig extends Config
keyName = "absorptioncoloroverthreshold",
name = "Color above threshold",
description = "Configures the color for the absorption widget when above the threshold",
position = 7
position = 5
)
default Color absorptionColorAboveThreshold()
{
@@ -117,7 +95,7 @@ public interface NightmareZoneConfig extends Config
keyName = "absorptioncolorbelowthreshold",
name = "Color below threshold",
description = "Configures the color for the absorption widget when below the threshold",
position = 8
position = 6
)
default Color absorptionColorBelowThreshold()
{

View File

@@ -38,7 +38,6 @@ import net.runelite.client.Notifier;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.ui.ClientUI;
import net.runelite.client.ui.overlay.Overlay;
@PluginDescriptor(
@@ -51,9 +50,6 @@ public class NightmareZonePlugin extends Plugin
@Inject
private Notifier notifier;
@Inject
private ClientUI gui;
@Inject
private Client client;
@@ -117,7 +113,7 @@ public class NightmareZonePlugin extends Plugin
String msg = event.getMessage().replaceAll("<[^>]*>", " "); //remove color and linebreaks
if (msg.contains("The effects of overload have worn off, and you feel normal again."))
{
sendNotification("Your overload has worn off");
notifier.notify("Your overload has worn off");
}
}
@@ -129,7 +125,7 @@ public class NightmareZonePlugin extends Plugin
{
if (absorptionPoints < config.absorptionThreshold())
{
sendNotification("Absorption points below: " + config.absorptionThreshold());
notifier.notify("Absorption points below: " + config.absorptionThreshold());
absorptionNotificationSend = true;
}
}
@@ -146,16 +142,4 @@ public class NightmareZonePlugin extends Plugin
{
return Arrays.equals(client.getMapRegions(), NMZ_MAP_REGION);
}
private void sendNotification(String message)
{
if (!gui.isFocused() && config.requestFocus())
{
gui.requestFocus();
}
if (config.sendTrayNotification())
{
notifier.notify(message);
}
}
}