0

Refactored timeout #5

Closed
ludvigk wants to merge 1 commits from patch-1 into master

View File

@ -124,10 +124,11 @@ public class Saylol implements Module
public boolean saylol(CommandSender sender) public boolean saylol(CommandSender sender)
{ {
long time = System.currentTimeMillis(); long time = System.currentTimeMillis();
if (time - lastLol < 15000) int timeout = 15000;
if (time - lastLol < timeout)
{ {
Utils.sendErrorMessage(sender, null, 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; return true;
} }
String name; String name;