Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int getTimeLeft(Player p, int questID) {
- int lastUse = 0;
- int timeNow = (int) System.currentTimeMillis();
- int timeLeft = 0;
- if (questID == 1) {
- lastUse = Quest1CD.get(p);
- }
- if (questID == 2) {
- lastUse = Quest2CD.get(p);
- }
- if (questID == 3) {
- lastUse = Quest3CD.get(p);
- timeLeft = (int) TimeUnit.SECONDS.convert(
- (60 * 60 * 48)
- - TimeUnit.SECONDS.convert(timeNow - lastUse,
- TimeUnit.MILLISECONDS),
- TimeUnit.MILLISECONDS);
- }
- return timeLeft;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement