Step event - very simple question

Discussion in 'Plugin Development' started by randomman159, Aug 10, 2011.

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

    randomman159

    Is there a step event in bukkit that i can use? or some equivalent?

    Basically i want to constantly update something, so i need a function to be triggered every "step" or "game loop cycle".

    any help?
     
  2. Offline

    s1mpl3x

    create a sync repeating task... the period and delay are in serverticks. be careful since something that is executed every 1/20 sec might cause some lag if it is operation intensive

    getServer().getScheduler().scheduleSyncRepeatingTask(plugin, task, delay, period);
     
  3. Offline

    randomman159


    i am a game developer, i work with 1/60ths of a second, i know about lag ;)

    Thanks for the help
     
Thread Status:
Not open for further replies.

Share This Page