Skip to content

Commit

Permalink
Remove unneeded code
Browse files Browse the repository at this point in the history
  • Loading branch information
malafk committed Dec 26, 2022
1 parent 01d337a commit 719ea3c
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public String onRequest(OfflinePlayer player, @NotNull String identifier) {
case "playtime":
long playTime = user.getBase().getStatistic(Statistic.PLAY_ONE_MINUTE);
final long playtimeMs = System.currentTimeMillis() - (playTime * 50L);
return formatDateDiff(playtimeMs);
return DateUtil.formatDateDiff(playtimeMs);
case "vanished":
return user.isVanished() ? papiTrue : papiFalse;
case "afk":
Expand Down Expand Up @@ -473,11 +473,4 @@ private String fixMoney(double d) {

return String.valueOf(d);
}

public static String formatDateDiff(final long date) {
final Calendar c = new GregorianCalendar();
c.setTimeInMillis(date);
final Calendar now = new GregorianCalendar();
return DateUtil.formatDateDiff(now, c);
}
}

0 comments on commit 719ea3c

Please sign in to comment.