Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. if (cmd.getName().equalsIgnoreCase("rtp")) {
  2. if (cooldownTime.containsKey(p)) {
  3. p.sendMessage(ChatColor.RED + "You must wait for " + cooldownTime.get(p) + " seconds.");
  4. return true;
  5. }
  6. cooldownTime.put(p, 5);
  7. cooldownTask.put(p, new BukkitRunnable() {
  8. public void run() {
  9. cooldownTime.put(p, cooldownTime.get(p) - 1);
  10. if (cooldownTime.get(p) == 0) {
  11. cooldownTime.remove(p);
  12. cooldownTask.remove(p);
  13. cancel();
  14. }
  15. }
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement