Checking server time.

Discussion in 'Plugin Development' started by WeeSkilz, Sep 23, 2014.

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

    WeeSkilz

    I need to check the time in ticks automatically every few seconds (read: 100 ticks) I was wondering how I would do this?

    I was thinking that an ASync task would be the best way, but I then thought that I shouldn't use it to call a Bukkit method.

    Any suggestions?
     
  2. Offline

    Cerberus XII

    WeeSkilz, Depends you could use a task as long as it doesn't execute that much code otherwise it will slowly destroy the server and it won't be able to keep up xD
     
  3. Offline

    mythbusterma

  4. Offline

    Skionz

    WeeSkilz Like time since the server has started? Or System.currentTimeMillis?
     
  5. Offline

    WeeSkilz

    To run an operation at a certain time in the Minecraft day.

    Server day time, in ticks.
     
  6. Offline

    WeeSkilz

    That was suggested to me yesterday. I think that's what I'll do.
     
  7. WeeSkilz I wouldn't go with async unless you needed to, though. And if you do go with async, don't call the Bukkit API.
     
  8. Offline

    WeeSkilz

    Of course :p
     
Thread Status:
Not open for further replies.

Share This Page