diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index f0b4941b7..464002548 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -162,7 +162,7 @@ public class EssentialsPlayerListener extends PlayerListener event.setTo(loc); try { - user.getTeleport().teleport(loc, new Charge("portal")); + user.getTeleport().now(loc, new Charge("portal")); } catch (Exception ex) { diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java index a618e3eab..3318aa779 100644 --- a/Essentials/src/com/earth2me/essentials/Teleport.java +++ b/Essentials/src/com/earth2me/essentials/Teleport.java @@ -190,6 +190,7 @@ public class Teleport implements Runnable cooldown(true); if (delay <= 0 || user.isAuthorized("essentials.teleport.timer.bypass")) { + cooldown(false); now(target); if (chargeFor != null) { @@ -217,11 +218,20 @@ public class Teleport implements Runnable public void now(Location loc) throws Exception { + cooldown(false); + now(new Target(loc)); + } + + public void now(Location loc, Charge chargeFor) throws Exception + { + cooldown(false); + chargeFor.charge(user); now(new Target(loc)); } public void now(Entity entity) throws Exception { + cooldown(false); now(new Target(entity)); }