Class TaskTime

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

public final class TaskTime extends Object
Task timings
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals​(Object o)
     
    @org.checkerframework.checker.index.qual.NonNegative long
    Get the task time
    Get the time unit
    int
     
    static @NonNull TaskTime
    ms​(@org.checkerframework.checker.index.qual.NonNegative long ms)
    Create a new task time in milliseconds
    static @NonNull TaskTime
    seconds​(@org.checkerframework.checker.index.qual.NonNegative long seconds)
    Create a new task time in seconds
    static @NonNull TaskTime
    ticks​(@org.checkerframework.checker.index.qual.NonNegative long ticks)
    Create a new task time in server ticks

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • 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

      public @NonNull TaskTime.TaskUnit 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