Cooldown Help

Discussion in 'Plugin Development' started by ElliottOlson, Aug 18, 2014.

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

    ElliottOlson

    Hello Bukkit Developers,

    I am here today to try to find a way to have a cooldown for a kit plugin, but have it be able to keep going through a reload and not be cleared.

    Thanks.
     
  2. ElliottOlson Store the time they'll be allowed to use it again to file.
     
  3. Offline

    ElliottOlson

    AdamQpzm Can you explain how to get the current time, and how to add for example 20 minutes to it and store that time? I am having trouble understanding how to get the future time.
     
  4. Offline

    Forseth11

    1. Get the current time in milliseconds.
    2. Save it to a bukkit config.
    3. Check the current time minus that value in the config and see if it is greater than or equal to 20 minutes.
    Then do want you need to do.
    If they do not pass the cool down tell them how many more minutes they must wait.

    Remember 1000 milliseconds = 1 second.
     
Thread Status:
Not open for further replies.

Share This Page