Cooldown

Discussion in 'Plugin Development' started by BlueMond416, Apr 9, 2012.

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

    BlueMond416

    I am not sure how to make a cooldown for a certain person. Say the event happens and then timer starts and if they try doing it again before the timer ends they get a message saying they can't then they can do it again after the timer runs out.
     
  2. use PlayerCommandPreProcessEvent
     
  3. Offline

    BlueMond416

    ferrybig ok but what exactly am I doing with that?

    and it's not a command it's an action

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  4. use an map, whit as key the Player name as string, and value the last time he did the action
     
  5. Offline

    BlueMond416

    Does anyone have a plugin exerpt as an example?
     
  6. Offline

    AJAW

  7. Offline

    nossr50

    Like AJAW said, mcMMO utilizes cooldowns on abilities and we are open source :)
     
Thread Status:
Not open for further replies.

Share This Page