cooldown countdown

Discussion in 'Plugin Development' started by looparound, Oct 10, 2013.

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

    looparound

    I have never really dealt with countdowns before, and im trying to do it for a kit cooldown. But its being VERY BUGGY. It's very hard to explain like what happens in game but here is the code, if u see whats wrong i would appreciate it if you would tell me! :D http://pastebin.com/nbQpKBTU
     
  2. First things first: please try to use correct indention style for code, you post here. Your pastebin is quite hard to read.

    Now to your problem: I couldn't find the declaration of Hulkcount anywhere so I expect it is defined as a member in you event listener class. As you normally only have only one instance of this class, you will have only one cooldown used for all players, that are online. Means when to or more players use your command at the same time, it will behave quite strange, and indescribably. To fix this, simply move the declaration and initialization of Hulkcount into your anonymous Runnable class. Then you will have a separate Hulkcount for each running task.
     
Thread Status:
Not open for further replies.

Share This Page