A general question regarding the way a server handles time.

Discussion in 'Plugin Development' started by DrBoweNur, Jul 31, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    DrBowe

    Pretty basic question...but one that has been quite tricky for me to find out via testing:
    The server's time is usually 0-24000, this much is a fact.

    However, does the server auto-wrap the time once it passes 24000? Or would I need to wrap it myself (if I was monitoring day/night cycles)
     
  2. Offline

    Coryf88

    It would depend on the method you're using to retrieve the time.

    World.getTime(): returns relative world time. In other words, 0 to 24000.

    World.getFullTime(): returns the world time/date. In other words, the current world lifetime (0 to Long.MAX_VALUE).

    So, if you were trying to figure out if it was day or night, you'd use getTime(). If you wanted to know which day it was, you'd use getFullTime().
    See the source (The links above) for exact details of both of the methods.

     
Thread Status:
Not open for further replies.

Share This Page