Skip to content

Commit

Permalink
Fix format parsing in /heal (Fixes #5690)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evidentsinger14 committed Feb 20, 2024
1 parent 4386713 commit 1929d41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Essentials/src/main/java/com/earth2me/essentials/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.google.common.collect.Lists;
import net.ess3.api.IEssentials;
import net.ess3.api.MaxMoneyException;
import net.ess3.api.TranslatableException;
import net.ess3.api.events.AfkStatusChangeEvent;
import net.ess3.api.events.JailStatusChangeEvent;
import net.ess3.api.events.MuteStatusChangeEvent;
Expand Down Expand Up @@ -225,7 +226,7 @@ public void healCooldown() throws Exception {
cooldownTime.add(Calendar.SECOND, (int) cooldown);
cooldownTime.add(Calendar.MILLISECOND, (int) ((cooldown * 1000.0) % 1000.0));
if (cooldownTime.after(now) && !isAuthorized("essentials.heal.cooldown.bypass")) {
throw new Exception(playerTl("timeBeforeHeal", DateUtil.formatDateDiff(cooldownTime.getTimeInMillis())));
throw new TranslatableException("timeBeforeHeal", DateUtil.formatDateDiff(cooldownTime.getTimeInMillis()));
}
}
setLastHealTimestamp(now.getTimeInMillis());
Expand Down

0 comments on commit 1929d41

Please sign in to comment.