Cooldown BUG

Discussion in 'Plugin Development' started by ChromeHD__, Apr 30, 2015.

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

    ChromeHD__

    [​IMG]
    that is what shows up when i use

    Code:
    int estTime = (int) ((System.currentTimeMillis() - startTime) / 1000);
    int timeleft = (20 - estTime);
    Commands.SendMessage(p, "please wait " + timeleft + " seconds before using again!");
    How can i fix this
     
  2. Offline

    mine-care

    You may use TimeUnit enum that does it for you like TimeUnit.MILLS.toSeconds(Long parammills)
    Also follow java nmaming conventions :- )
     
Thread Status:
Not open for further replies.

Share This Page