0

Refactored timeout #5

Closed
ludvigk wants to merge 1 commits from patch-1 into master
Showing only changes of commit 47b8de87cf - Show all commits

View File

@ -124,10 +124,11 @@ public class Saylol implements Module
public boolean saylol(CommandSender sender)
{
long time = System.currentTimeMillis();
if (time - lastLol < 15000)
int timeout = 15000;
if (time - lastLol < timeout)
{
Utils.sendErrorMessage(sender, null,
"You can't use saylol for another " + (14 - (int) Math.ceil((time - lastLol) / 1000)) + "s.");
"You can't use saylol for another " + (timeout - (time - lastLol)) / 1000 + "s.");
return true;
}
String name;