xeRicker

Untitled

Apr 16th, 2016
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. ===================================================================================================================================
  2. public static void startCooldownTask()
  3. {
  4. new BukkitRunnable()
  5. {
  6. public void run()
  7. {
  8. for (Iterator i$ = ConfigMgr.playerData.getKeys(false).iterator(); i$.hasNext();)
  9. {
  10. uuid = (String)i$.next();
  11. for (String cooldown : ConfigMgr.playerData.getConfigurationSection(uuid + ".cooldowns").getKeys(false))
  12. {
  13. String path = uuid + ".cooldowns." + cooldown;
  14. if (ConfigMgr.playerData.getLong(path) != 0L)
  15. {
  16. ConfigMgr.playerData.set(path, Long.valueOf(ConfigMgr.playerData.getLong(path) - 1L));
  17. if (ConfigMgr.playerData.getLong(path) == 0L)
  18. {
  19. rewardPath = "rewards." + cooldown;
  20. Set<String> event = ConfigMgr.config.getConfigurationSection(rewardPath + ".expiry-events").getKeys(false);
  21. ===================================================================================================================================
  22. public static void startCooldownTask() {
  23. new BukkitRunnable() {
  24. @Override
  25. public void run() {
  26. for (String uuid : ConfigMgr.playerData.getKeys(false)) {
  27. for (String cooldown : ConfigMgr.playerData.getConfigurationSection(uuid + ".cooldowns").getKeys(false)) {
  28. String path = uuid + ".cooldowns." + cooldown;
  29. if (ConfigMgr.playerData.getLong(path) == 0) {
  30. continue;
  31. }
  32.  
  33. ConfigMgr.playerData.set(path, ConfigMgr.playerData.getLong(path) - 1);
  34. if (ConfigMgr.playerData.getLong(path) != 0) {
  35. continue;
  36. }
  37.  
  38. String rewardPath = "rewards." + cooldown;
  39. Set<String> event = ConfigMgr.config.getConfigurationSection(rewardPath + ".expiry-events").getKeys(false);
  40. ===================================================================================================================================
Advertisement
Add Comment
Please, Sign In to add comment