Package com.plotsquared.core.util
Class TimeUtil
java.lang.Object
com.plotsquared.core.util.TimeUtil
-
Method Summary
Modifier and TypeMethodDescriptionsecToTime
(@org.checkerframework.checker.index.qual.NonNegative long time) Format seconds into a string with the format #y #w #d #h #sstatic @org.checkerframework.checker.index.qual.NonNegative long
Parse a time string back into time
-
Method Details
-
secToTime
public static @NonNull String secToTime(@org.checkerframework.checker.index.qual.NonNegative long time) Format seconds into a string with the format #y #w #d #h #s- Parameters:
time
- Time to format- Returns:
- Formatted string
-
timeToSec
public static @org.checkerframework.checker.index.qual.NonNegative long timeToSec(@NonNull String string) Parse a time string back into time- Parameters:
string
- String to parse- Returns:
- Parsed time
-