Class Time

java.lang.Object
net.risingworld.api.objects.Time

public final class Time extends Object
Represents the ingame time and date.
  • Method Details

    • getSeconds

      public int getSeconds()
      Gets the seconds (0-59)
      Returns:
      the seconds.
    • getMinutes

      public int getMinutes()
      Gets the minutes (0-59)
      Returns:
      the minutes.
    • getHours

      public int getHours()
      Gets the hours (0-23)
      Returns:
      the hours.
    • getDay

      public int getDay()
      Gets the day of year (1-124). The game no longer has months, instead a year is separated into 4 seasons (spring, summer, autumn and winter). Each season has 31 days by default, so a year has 124 days (4 * 31).
      Returns:
      the day of year.
    • getMonth

      @Deprecated public int getMonth()
      Deprecated.
      No longer used.
      Gets the month (1-12)
      Returns:
      the month.
    • getYear

      public int getYear()
      Gets the current year (initial year is 0)
      Returns:
      the year.
    • getTime

      public int getTime(Time.Unit unit)
    • getMoonPhase

      public Time.MoonPhase getMoonPhase()
      Gets the current moon phase.
      Returns:
      the current moon phase.