Add ultimate force notification trigger to NMZ plugin (#5790)

This commit is contained in:
mikek2
2018-10-04 09:19:07 -04:00
committed by Tomas Slusny
parent 8c95515e8e
commit 559e914544
2 changed files with 23 additions and 5 deletions

View File

@@ -76,11 +76,22 @@ public interface NightmareZoneConfig extends Config
return false; return false;
} }
@ConfigItem(
keyName = "ultimateforcenotification",
name = "Ultimate Force notification",
description = "Toggles notifications when an ultimate force power-up appears",
position = 5
)
default boolean ultimateForceNotification()
{
return false;
}
@ConfigItem( @ConfigItem(
keyName = "overloadnotification", keyName = "overloadnotification",
name = "Overload notification", name = "Overload notification",
description = "Toggles notifications when your overload runs out", description = "Toggles notifications when your overload runs out",
position = 5 position = 6
) )
default boolean overloadNotification() default boolean overloadNotification()
{ {
@@ -91,7 +102,7 @@ public interface NightmareZoneConfig extends Config
keyName = "absorptionnotification", keyName = "absorptionnotification",
name = "Absorption notification", name = "Absorption notification",
description = "Toggles notifications when your absorption points gets below your threshold", description = "Toggles notifications when your absorption points gets below your threshold",
position = 6 position = 7
) )
default boolean absorptionNotification() default boolean absorptionNotification()
{ {
@@ -102,7 +113,7 @@ public interface NightmareZoneConfig extends Config
keyName = "absorptionthreshold", keyName = "absorptionthreshold",
name = "Absorption Threshold", name = "Absorption Threshold",
description = "The amount of absorption points to send a notification at", description = "The amount of absorption points to send a notification at",
position = 7 position = 8
) )
default int absorptionThreshold() default int absorptionThreshold()
{ {
@@ -113,7 +124,7 @@ public interface NightmareZoneConfig extends Config
keyName = "absorptioncoloroverthreshold", keyName = "absorptioncoloroverthreshold",
name = "Color above threshold", name = "Color above threshold",
description = "Configures the color for the absorption widget when above the threshold", description = "Configures the color for the absorption widget when above the threshold",
position = 8 position = 9
) )
default Color absorptionColorAboveThreshold() default Color absorptionColorAboveThreshold()
{ {
@@ -124,7 +135,7 @@ public interface NightmareZoneConfig extends Config
keyName = "absorptioncolorbelowthreshold", keyName = "absorptioncolorbelowthreshold",
name = "Color below threshold", name = "Color below threshold",
description = "Configures the color for the absorption widget when below the threshold", description = "Configures the color for the absorption widget when below the threshold",
position = 9 position = 10
) )
default Color absorptionColorBelowThreshold() default Color absorptionColorBelowThreshold()
{ {

View File

@@ -153,6 +153,13 @@ public class NightmareZonePlugin extends Plugin
notifier.notify(msg); notifier.notify(msg);
} }
} }
else if (msg.contains("Ultimate force"))
{
if (config.ultimateForceNotification())
{
notifier.notify(msg);
}
}
} }
} }