detect day cycles

Discussion in 'Plugin Development' started by Codisimus, Mar 26, 2011.

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

    Codisimus

    a plugin I'm working on requires reseting a value after a certain amount of days.i cant figure out how to do this. I want to be able to set the time to be either dependent on real days and minecraft days but just one of these would make me happy. The only thing i could think of is checking for a certain time of day but with beds and stuff im not sure if theres a better option. Thanks in advance.
     
  2. Offline

    Edward Hand

    To get server time:
    Code:
    long time = theWorld.getFullTime();
    A minecraftian day is 24000 ticks long

    To get the system time:
    Code:
    long time = System.currentTimeMillis()
     
Thread Status:
Not open for further replies.

Share This Page