Skip to content

Commit

Permalink
Fixed a little issue with cooldowns path in Cooldown#getTimeLeft.
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsoLeandro committed Jan 18, 2021
1 parent 47388c7 commit 6ecb9d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.alfonsoLeandro</groupId>
<artifactId>MPUtils</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<packaging>jar</packaging>

<name>MPUtils</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 6ecb9d1

Please sign in to comment.