1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-13 18:14:38 +02:00

[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
This commit is contained in:
ementalo
2011-05-04 23:19:17 +00:00
parent bb0c199d8e
commit 04c1e42d10
2 changed files with 4 additions and 4 deletions

View File

@@ -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;
}

View File

@@ -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());
}
}