Do something at certain time?

Discussion in 'Plugin Development' started by lilkoopa, Jun 28, 2011.

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

    lilkoopa

    Hello! I'm pretty new to making plugins so soz if this is a noob question, but I was wondering how, if possible, you can do something on a certain time in game. Say, for example, have something run only during the day. I know about getTime() and how to use it, but how do I make it so it will always update itself based on time? Soooo for a better example say I have a block and this block will disappear during the night, but when it hits daytime it pops right back.

    I tried searching and found nothing.[sheep]

    Free cake for anyone who can help me out.[cake][cake][cake][cake][cake][cake][cake]
    I've got a feeling its something very very simple, that's usually where I have the most trouble [creeper]
     
  2. Offline

    DrBowe

    I'm no expert on either, but I know you can use both the Bukkit Scheduler, and System.currentTimeMillis() to shape any sort of timed function.

    The scheduler is more convenient for anything that you want to repeat, whereas the System.currentTimeMillis() works best (or atleast I find it works best) for any sort of cool-down function.
     
Thread Status:
Not open for further replies.

Share This Page