From 6ecb9d1d6518ca035d8aed5250f6bbd018f18ab7 Mon Sep 17 00:00:00 2001 From: Leandro Alfonso Date: Mon, 18 Jan 2021 19:36:09 -0300 Subject: [PATCH] Fixed a little issue with cooldowns path in Cooldown#getTimeLeft. --- pom.xml | 2 +- .../java/com/github/alfonsoleandro/mputils/time/Cooldown.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0312432..83bfe21 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.github.alfonsoLeandro MPUtils - 1.5.0 + 1.5.1 jar MPUtils diff --git a/src/main/java/com/github/alfonsoleandro/mputils/time/Cooldown.java b/src/main/java/com/github/alfonsoleandro/mputils/time/Cooldown.java index c39e883..74234cf 100644 --- a/src/main/java/com/github/alfonsoleandro/mputils/time/Cooldown.java +++ b/src/main/java/com/github/alfonsoleandro/mputils/time/Cooldown.java @@ -100,7 +100,7 @@ public boolean isInCooldown(String playerName){ * @return The time left for the player to leave the cooldown or 0 if the player was not in cooldown. */ public long getTimeLeft(String playerName){ - if(!cooldownYaml.getAccess().contains(playerName)) return 0; + if(!cooldownYaml.getAccess().contains("cooldowns."+cooldownName+"."+playerName)) return 0; final long timeLeft = cooldownYaml.getAccess().getLong("cooldowns."+cooldownName+"."+playerName) - System.currentTimeMillis();