Solved Schedulers

Discussion in 'Plugin Development' started by BungeeTheCookie, Jul 19, 2014.

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

    BungeeTheCookie

    Hello people of the Bukkit community!

    I was wondering how you can calculate the time before a task is executed [this way I can save tasks to a config on disable and restart them when the server enables]
     
  2. Offline

    _Filip

    BungeeTheCookie
    HashMap<Integer (Task id or change this to some other identifier), Long (System#currentTimeMillis to store the start time)>
    then onDisable, System#currentTimeMillis - theHashMapAbove.get(identifier) to get the amount of time the task has been running
     
  3. Offline

    BungeeTheCookie

    I really need to start looking at more Java methods.
     
  4. Offline

    _Filip

    BungeeTheCookie
    The way I learn things like NMS methods', CraftBukkit methods', and java methods' function and how they do it, it with IntelliJ, I look at the declaration, or ctrl+left click, with a java decompiler plugin added to the IDE, so it is quick, I don't need to look for anything, and it's not too slow.
     
  5. Offline

    BungeeTheCookie

    Gracias.
     
Thread Status:
Not open for further replies.

Share This Page