From 47b8de87cf3cb9521b307140c6809172af777a48 Mon Sep 17 00:00:00 2001 From: ludvigk Date: Tue, 14 Feb 2017 21:33:13 +0100 Subject: [PATCH] Refactored timeout --- src/com/redstoner/modules/saylol/Saylol.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/redstoner/modules/saylol/Saylol.java b/src/com/redstoner/modules/saylol/Saylol.java index e85ebc4..2e6acf0 100644 --- a/src/com/redstoner/modules/saylol/Saylol.java +++ b/src/com/redstoner/modules/saylol/Saylol.java @@ -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; -- 2.45.2