Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (cmd.getName().equalsIgnoreCase("rtp")) {
- if (cooldownTime.containsKey(p)) {
- p.sendMessage(ChatColor.RED + "You must wait for " + cooldownTime.get(p) + " seconds.");
- return true;
- }
- cooldownTime.put(p, 5);
- cooldownTask.put(p, new BukkitRunnable() {
- public void run() {
- cooldownTime.put(p, cooldownTime.get(p) - 1);
- if (cooldownTime.get(p) == 0) {
- cooldownTime.remove(p);
- cooldownTask.remove(p);
- cancel();
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement