summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-06-16 16:46:40 +0100
committerKHobbits <rob@khobbits.co.uk>2012-06-16 16:46:40 +0100
commit4e5e5a9684394209c27cb2fec60cb72bf1541c4c (patch)
treeafac61a14de1805527901ee4bb707012eb7ea4e3
parent97eada7dd6ee2bb80babf25834101baa5bbc9a7b (diff)
downloadEssentials-4e5e5a9684394209c27cb2fec60cb72bf1541c4c.tar
Essentials-4e5e5a9684394209c27cb2fec60cb72bf1541c4c.tar.gz
Essentials-4e5e5a9684394209c27cb2fec60cb72bf1541c4c.tar.lz
Essentials-4e5e5a9684394209c27cb2fec60cb72bf1541c4c.tar.xz
Essentials-4e5e5a9684394209c27cb2fec60cb72bf1541c4c.zip
Fix teleport cooldowns - thanks @basicsensei
Fixes #2260
-rw-r--r--Essentials/src/com/earth2me/essentials/Teleport.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java
index a920544cb..63ff59644 100644
--- a/Essentials/src/com/earth2me/essentials/Teleport.java
+++ b/Essentials/src/com/earth2me/essentials/Teleport.java
@@ -169,8 +169,8 @@ public class Teleport implements Runnable, ITeleport
else if (lastTime > earliestLong && !user.isAuthorized("essentials.teleport.cooldown.bypass"))
{
time.setTimeInMillis(lastTime);
- time.add(Calendar.SECOND, (int)delay);
- time.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0));
+ time.add(Calendar.SECOND, (int)cooldown);
+ time.add(Calendar.MILLISECOND, (int)((cooldown * 1000.0) % 1000.0));
throw new Exception(_("timeBeforeTeleport", Util.formatDateDiff(time.getTimeInMillis())));
}
}