diff options
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java b/src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java index c64fdb56..d373ef2c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java @@ -49,6 +49,13 @@ public class NotificationHandler { showNotificationOverInv = overInventory; } + /** + * Stops rendering the notification, if one is displayed + */ + public static void cancelNotification() { + notificationDisplayMillis = 0; + } + public static void renderNotification() { long timeRemaining = 15000 - (System.currentTimeMillis() - notificationDisplayMillis); boolean display = timeRemaining > 0 || notificationDisplayMillis == -420; |
