Schedulers

Discussion in 'Plugin Development' started by CraftCreeper6, Mar 3, 2014.

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

    CraftCreeper6

    Hello! I am working on a plugin currently and am wondering how to use Schedulers. Not to sure, I am a noob to schedulers so don't take the mick out of this code :p I tried:
    Scheduler start; // Creates Scheduler start I think!?

    If that's not right^^ Tell me :) And I as wondering, how would I set the time, reset the time etc... Any help or threads that could help appreciated!

    BUMP - Really need this :/ Sorry :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  2. Offline

    DogeDev

    Try this: http://wiki.bukkit.org/Scheduler_Programming
    Code:java
    1. Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, new BukkitRunnable() {
    2. public void run() {
    3. //DO STUFF
    4. }
    5. }, 0L, 3L);

    This is a repeating task scheduler example.
     
Thread Status:
Not open for further replies.

Share This Page