Best cooldown system!?

Discussion in 'Plugin Development' started by EnchantedMiners, Dec 12, 2015.

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

    EnchantedMiners

    So im looking for the best cooldown system... because the only way i know to do cooldowns is thru bukkit delay tasks but the cooldown will be removed if the server restarts or reload.... how would i do a cooldown with like time for example... if there is a library that would work please let me know
     
  2. Offline

    mcdorli

    Save the time the last occasion happened in the config, and get it back later, subtract it from the current time, and if that is bigger or equals to the cooldown, then set the configs cooldown to the current time, and do your stuff.
     
  3. Offline

    EnchantedMiners

    Thanks!
     
Thread Status:
Not open for further replies.

Share This Page