Refactored timeout #5
@ -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;
|
||||||
|
Reference in New Issue
Block a user