From b7a68ab7548a81f1b56f124c631694050b097a87 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Tue, 20 Sep 2022 14:55:58 +0800 Subject: meta+ fix god potion alert --- src/features/hud/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/features') diff --git a/src/features/hud/index.js b/src/features/hud/index.js index cb94cbe..97e8a8e 100644 --- a/src/features/hud/index.js +++ b/src/features/hud/index.js @@ -641,7 +641,7 @@ class Hud extends Feature { } text += `&6God potion&7>&f ${timeLeft}\n` - if (this.potsOutAlert.getValue() && godPotTime - Date.now() > 60000 && Date.now() - (this.lastPotAlerts["godpot"] || 0) > 2 * 60000) { + if (this.potsOutAlert.getValue() && godPotTime - Date.now() < 60000 && Date.now() - (this.lastPotAlerts["godpot"] || 0) > 2 * 60000) { this.lastPotAlerts["godpot"] = Date.now() ChatLib.chat(this.FeatureManager.messagePrefix + "Your God potion is about to run out!") } @@ -654,7 +654,7 @@ class Hud extends Feature { let potName = firstLetterCapital(k.replace(/_/g, " ")) - if (this.potsOutAlert.getValue() && potData.time - Date.now() > 60000 && Date.now() - (this.lastPotAlerts[k] || 0) > 2 * 60000) { + if (this.potsOutAlert.getValue() && potData.time - Date.now() < 60000 && Date.now() - (this.lastPotAlerts[k] || 0) > 2 * 60000) { this.lastPotAlerts[k] = Date.now() ChatLib.chat(this.FeatureManager.messagePrefix + "Your " + potName + " is about to run out!") } -- cgit