summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-01-14 16:42:53 +0000
committerKHobbits <rob@khobbits.co.uk>2012-01-14 16:42:53 +0000
commit700cc5d0240f8cc76134850d5cdec2ca77f86349 (patch)
tree288f5f3f37f19bc7d94ca67049860004e9a09969
parent0a9f815fbb5828acb2df2848a74d089b9f66494c (diff)
downloadEssentials-700cc5d0240f8cc76134850d5cdec2ca77f86349.tar
Essentials-700cc5d0240f8cc76134850d5cdec2ca77f86349.tar.gz
Essentials-700cc5d0240f8cc76134850d5cdec2ca77f86349.tar.lz
Essentials-700cc5d0240f8cc76134850d5cdec2ca77f86349.tar.xz
Essentials-700cc5d0240f8cc76134850d5cdec2ca77f86349.zip
Fixing double charges on /home
Test #1426
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandhome.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
index d1db6c523..55bd75d0c 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
@@ -50,7 +50,7 @@ public class Commandhome extends EssentialsCommand
if (bed != null)
{
user.getTeleport().teleport(bed, charge, TeleportCause.COMMAND);
- return;
+ throw new NoChargeException();
}
}
user.getTeleport().home(player, homeName.toLowerCase(Locale.ENGLISH), charge);
@@ -64,10 +64,10 @@ public class Commandhome extends EssentialsCommand
if (bed != null)
{
user.getTeleport().teleport(bed, charge, TeleportCause.COMMAND);
- return;
+ throw new NoChargeException();
}
user.getTeleport().respawn(charge, TeleportCause.COMMAND);
- return;
+
}
else if (homes.isEmpty())
{
@@ -76,7 +76,6 @@ public class Commandhome extends EssentialsCommand
else if (homes.size() == 1 && player.equals(user))
{
user.getTeleport().home(player, homes.get(0), charge);
- return;
}
else
{