aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLulonaut <67191924+Lulonaut@users.noreply.github.com>2022-06-30 11:02:16 +0200
committerGitHub <noreply@github.com>2022-06-30 11:02:16 +0200
commit2cd45dc50ca58fe265f637d84800de7dad96cdda (patch)
tree43e75d9430b29824cb50effb60477c9601106d3e /src
parent39983fc847e2ee34aca9ccf14c833fbcb281fa2e (diff)
downloadNotEnoughUpdates-2cd45dc50ca58fe265f637d84800de7dad96cdda.tar.gz
NotEnoughUpdates-2cd45dc50ca58fe265f637d84800de7dad96cdda.tar.bz2
NotEnoughUpdates-2cd45dc50ca58fe265f637d84800de7dad96cdda.zip
cookie bug (v2) (#175)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CookieWarning.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CookieWarning.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CookieWarning.java
index ca1865cd..f21d0c50 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CookieWarning.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CookieWarning.java
@@ -62,13 +62,15 @@ public class CookieWarning {
}
}
if (!hasCookie) {
- NotificationHandler.displayNotification(Lists.newArrayList(
- "\u00a7cBooster Cookie Ran Out!",
- "\u00a77Your Booster Cookie expired!",
- "\u00a77",
- "\u00a77Press X on your keyboard to close this notification"
- ), true, true);
- hasNotified = true;
+ if (!hasNotified) {
+ NotificationHandler.displayNotification(Lists.newArrayList(
+ "\u00a7cBooster Cookie Ran Out!",
+ "\u00a77Your Booster Cookie expired!",
+ "\u00a77",
+ "\u00a77Press X on your keyboard to close this notification"
+ ), true, true);
+ hasNotified = true;
+ }
return;
}
if (timeLine != null) {
@@ -97,7 +99,7 @@ public class CookieWarning {
"NEU ran into an issue when retrieving the Booster Cookie Timer. Check the logs for details."));
hasNotified = true;
}
- if (minutes < NotEnoughUpdates.INSTANCE.config.notifications.boosterCookieWarningMins) {
+ if (minutes < NotEnoughUpdates.INSTANCE.config.notifications.boosterCookieWarningMins && !hasNotified) {
NotificationHandler.displayNotification(Lists.newArrayList(
"\u00a7cBooster Cookie Running Low!",
"\u00a77Your Booster Cookie will expire in " + timeLine,
@@ -105,9 +107,6 @@ public class CookieWarning {
"\u00a77Press X on your keyboard to close this notification"
), true, true);
hasNotified = true;
- } else if (hasNotified) {
- NotificationHandler.cancelNotification();
- hasNotified = false;
}
}
}