diff options
author | ementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-05-04 23:19:17 +0000 |
---|---|---|
committer | ementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-05-04 23:19:17 +0000 |
commit | cf020d235ed917eab5ce059eaf903dd6a5fe1b1b (patch) | |
tree | 197135e5f81b98cd6dc2974a5fa46c3b11b26dc1 | |
parent | 27dffd15331d4831182328514874d0109a932deb (diff) | |
download | Essentials-cf020d235ed917eab5ce059eaf903dd6a5fe1b1b.tar Essentials-cf020d235ed917eab5ce059eaf903dd6a5fe1b1b.tar.gz Essentials-cf020d235ed917eab5ce059eaf903dd6a5fe1b1b.tar.lz Essentials-cf020d235ed917eab5ce059eaf903dd6a5fe1b1b.tar.xz Essentials-cf020d235ed917eab5ce059eaf903dd6a5fe1b1b.zip |
[trunk warps should charge only once, and not when an exception happens
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1344 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Teleport.java | 5 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandwarp.java | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java index 0fc83da73..f04a2d8c9 100644 --- a/Essentials/src/com/earth2me/essentials/Teleport.java +++ b/Essentials/src/com/earth2me/essentials/Teleport.java @@ -87,11 +87,12 @@ public class Teleport implements Runnable user.sendMessage("§7Teleportation commencing..."); try { + + now(teleportTarget); if (chargeFor != null) { user.charge(chargeFor); } - now(teleportTarget); } catch (Throwable ex) { @@ -188,11 +189,11 @@ public class Teleport implements Runnable cooldown(true); if (delay <= 0 || user.isAuthorized("essentials.teleport.timer.bypass")) { + now(target); if (chargeFor != null) { user.charge(chargeFor); } - now(target); return; } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java index 8b8df3c19..ba9cc8c4a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java @@ -65,6 +65,7 @@ public class Commandwarp extends EssentialsCommand return; } warpUser(otherUser, args[0]); + return; } warpUser(user, args[0]); } @@ -76,14 +77,12 @@ public class Commandwarp extends EssentialsCommand { if (user.isAuthorized("essentials.warp." + name)) { - charge(user); user.getTeleport().warp(name, this.getName()); return; } user.sendMessage("§cYou do not have Permission to use that warp."); return; } - charge(user); user.getTeleport().warp(name, this.getName()); } }
\ No newline at end of file |