0

Refactored timeout

This commit is contained in:
ludvigk
2017-02-14 21:33:13 +01:00
committed by GitHub
parent 6e65173ba6
commit 47b8de87cf

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;