How to make a Clock?

Discussion in 'Plugin Development' started by Blacky372, Aug 23, 2011.

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

    Blacky372

    I want to execute a piece of code every [...] seconds/ticks.
    Is that possible?

    mfg
    Blacky372
     
  2. Offline

    SpikeMeister

  3. Offline

    Blacky372

    I heard that there is a function/event that i can define and set a timer.
    And if it dont exists how can for example the plugin "Jail" control the time, the Player is jailed????

    mfg
    Blacky372
     
  4. Use the bukkit scheduler. Bukkit.getServer().getScheduler() gives you what you need. Look at the apidocs for more information!
    scheduleSyncRepeatingTask would be your solution.
     
  5. Offline

    Blacky372

    Yeah!
    That's what i was searching for.
    Thanks a lot.
     
Thread Status:
Not open for further replies.

Share This Page