Class TaskTime

java.lang.Object
com.plotsquared.core.util.task.TaskTime

public final class TaskTime extends Object
Task timings
  • 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

      public static @NonNull TaskTime ms(@org.checkerframework.checker.index.qual.NonNegative long 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object