Skip to content
This repository was archived by the owner on Jun 7, 2022. It is now read-only.

Commit c303a99

Browse files
author
Tarek
committed
fixed calc days
1 parent 4db817b commit c303a99

File tree

1 file changed

+2
-1
lines changed
  • cloudnet-modules/cloudnet-modules-permission/src/main/java/de/dytanic/cloudnetcore/permissions/command

1 file changed

+2
-1
lines changed

cloudnet-modules/cloudnet-modules-permission/src/main/java/de/dytanic/cloudnetcore/permissions/command/CommandPermissions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import java.text.SimpleDateFormat;
2222
import java.util.*;
23+
import java.util.concurrent.TimeUnit;
2324

2425
/**
2526
* Created by Tareko on 20.08.2017.
@@ -504,7 +505,7 @@ private void updatePlayer(OfflinePlayer offlinePlayer)
504505

505506
private long calcDays(int value)
506507
{
507-
return System.currentTimeMillis() + ((60 * 60 * 1000 * 24 * value));
508+
return (System.currentTimeMillis() + ((TimeUnit.DAYS.toMillis(value))));
508509
}
509510

510511
private boolean permissionIsSet(Map<String, Boolean> permissions, String permission, boolean value)

0 commit comments

Comments
 (0)