Package com.plotsquared.core.util.task
Class TaskTime
java.lang.Object
com.plotsquared.core.util.task.TaskTime
Task timings
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
-
Method Summary
Modifier and TypeMethodDescriptionboolean
@org.checkerframework.checker.index.qual.NonNegative long
getTime()
Get the task time@NonNull TaskTime.TaskUnit
getUnit()
Get the time unitint
hashCode()
static @NonNull TaskTime
ms(@org.checkerframework.checker.index.qual.NonNegative long ms)
Create a new task time in millisecondsstatic @NonNull TaskTime
seconds(@org.checkerframework.checker.index.qual.NonNegative long seconds)
Create a new task time in secondsstatic @NonNull TaskTime
ticks(@org.checkerframework.checker.index.qual.NonNegative long ticks)
Create a new task time in server ticks
-
Method Details
-
seconds
public static @NonNull TaskTime seconds(@org.checkerframework.checker.index.qual.NonNegative long seconds)Create a new task time in seconds- Parameters:
seconds
- Seconds- Returns:
- Created task time instance
-
ticks
public static @NonNull TaskTime ticks(@org.checkerframework.checker.index.qual.NonNegative long ticks)Create a new task time in server ticks- Parameters:
ticks
- Server ticks- Returns:
- Created task time instance
-
ms
Create a new task time in milliseconds- Parameters:
ms
- Milliseconds- Returns:
- Created task time instance
-
getTime
public @org.checkerframework.checker.index.qual.NonNegative long getTime()Get the task time- Returns:
- Task time
-
getUnit
Get the time unit- Returns:
- Time unit
-
equals
-
hashCode
public int hashCode()
-