mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI.git
synced 2024-11-15 23:25:34 +01:00
Cleaned up excess code in TimeUtils
This commit is contained in:
parent
62e282cc0e
commit
111f5462fc
@ -27,9 +27,7 @@ public class TimeUtil {
|
||||
if (seconds < 60) {
|
||||
switch (type) {
|
||||
case DAYS:
|
||||
return "0";
|
||||
case HOURS:
|
||||
return "0";
|
||||
case MINUTES:
|
||||
return "0";
|
||||
case SECONDS:
|
||||
@ -44,7 +42,6 @@ public class TimeUtil {
|
||||
if (minutes < 60) {
|
||||
switch (type) {
|
||||
case DAYS:
|
||||
return "0";
|
||||
case HOURS:
|
||||
return "0";
|
||||
case MINUTES:
|
||||
@ -118,9 +115,9 @@ public class TimeUtil {
|
||||
int secondsLeft = seconds - s;
|
||||
if (minutes < 60) {
|
||||
if (secondsLeft > 0) {
|
||||
return String.valueOf(minutes + "m " + secondsLeft + "s");
|
||||
return minutes + "m " + secondsLeft + "s";
|
||||
} else {
|
||||
return String.valueOf(minutes + "m");
|
||||
return minutes + "m";
|
||||
}
|
||||
}
|
||||
if (minutes < 1440) {
|
||||
|
Loading…
Reference in New Issue
Block a user