Runnable

Discussion in 'Plugin Development' started by xX1yeahXx, Jan 20, 2015.

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

    xX1yeahXx

    Hey guys,
    i have a Runnable which starts counting when joining the server.
    But if somebody leaves the server the Runnable have to stop and if the player joins
    after 2 minutes again, the Runnable should continue running the rest of the Runnable.
    I hope you understand what I want from you.
    Thanks!
     
  2. Offline

    teej107

    Show your code attempt.
     
  3. Offline

    pie_flavor

    @xX1yeahXx Use BukkitRunnable instead of Runnable. It works exactly the same, except you extend instead of implement. Store said BukkitRunnable in a variable. Add a listener for a PlayerQuitEvent, and from it call cancel() on the BukkitRunnable. Not sure exactly how to start it up again.
     
  4. Offline

    xX1yeahXx

    Ok. Thank you :)
     
Thread Status:
Not open for further replies.

Share This Page