diff options
author | snowleo <schneeleo@gmail.com> | 2011-09-29 23:57:44 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-09-29 23:59:25 +0200 |
commit | 44e920e44125f1a05fe4bd0d899e0eb797d5cda7 (patch) | |
tree | bb50636a1ec82957614f3a97d2bf03043cf423b8 | |
parent | f8450e39e31e9c90e28d96ee4de4275554537059 (diff) | |
download | Essentials-44e920e44125f1a05fe4bd0d899e0eb797d5cda7.tar Essentials-44e920e44125f1a05fe4bd0d899e0eb797d5cda7.tar.gz Essentials-44e920e44125f1a05fe4bd0d899e0eb797d5cda7.tar.lz Essentials-44e920e44125f1a05fe4bd0d899e0eb797d5cda7.tar.xz Essentials-44e920e44125f1a05fe4bd0d899e0eb797d5cda7.zip |
More exceptions thrown
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index 97bcb9c8e..3ea3aae40 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -80,8 +80,7 @@ public class Commandspawnmob extends EssentialsCommand Block block = (new TargetBlock(user, 300, 0.2, ignore)).getTargetBlock(); if (block == null) { - user.sendMessage(Util.i18n("unableToSpawnMob")); - return; + throw new Exception(Util.i18n("unableToSpawnMob")); } Location loc = block.getLocation(); Location sloc = Util.getSafeDestination(loc); @@ -91,8 +90,7 @@ public class Commandspawnmob extends EssentialsCommand } catch (MobException e) { - user.sendMessage(Util.i18n("unableToSpawnMob")); - return; + throw new Exception(Util.i18n("unableToSpawnMob")); } if (mountType != null) @@ -114,8 +112,7 @@ public class Commandspawnmob extends EssentialsCommand } catch (MobException e) { - user.sendMessage(Util.i18n("unableToSpawnMob")); - return; + throw new Exception(Util.i18n("unableToSpawnMob")); } spawnedMob.setPassenger(spawnedMount); } @@ -150,8 +147,7 @@ public class Commandspawnmob extends EssentialsCommand } catch (MobException e) { - user.sendMessage(Util.i18n("unableToSpawnMob")); - return; + throw new Exception(Util.i18n("unableToSpawnMob")); } spawnedMob.setPassenger(spawnedMount); } |