More exceptions thrown

This commit is contained in:
snowleo 2011-09-29 23:57:44 +02:00
parent f8450e39e3
commit 44e920e441

View File

@ -80,8 +80,7 @@ public class Commandspawnmob extends EssentialsCommand
Block block = (new TargetBlock(user, 300, 0.2, ignore)).getTargetBlock(); Block block = (new TargetBlock(user, 300, 0.2, ignore)).getTargetBlock();
if (block == null) if (block == null)
{ {
user.sendMessage(Util.i18n("unableToSpawnMob")); throw new Exception(Util.i18n("unableToSpawnMob"));
return;
} }
Location loc = block.getLocation(); Location loc = block.getLocation();
Location sloc = Util.getSafeDestination(loc); Location sloc = Util.getSafeDestination(loc);
@ -91,8 +90,7 @@ public class Commandspawnmob extends EssentialsCommand
} }
catch (MobException e) catch (MobException e)
{ {
user.sendMessage(Util.i18n("unableToSpawnMob")); throw new Exception(Util.i18n("unableToSpawnMob"));
return;
} }
if (mountType != null) if (mountType != null)
@ -114,8 +112,7 @@ public class Commandspawnmob extends EssentialsCommand
} }
catch (MobException e) catch (MobException e)
{ {
user.sendMessage(Util.i18n("unableToSpawnMob")); throw new Exception(Util.i18n("unableToSpawnMob"));
return;
} }
spawnedMob.setPassenger(spawnedMount); spawnedMob.setPassenger(spawnedMount);
} }
@ -150,8 +147,7 @@ public class Commandspawnmob extends EssentialsCommand
} }
catch (MobException e) catch (MobException e)
{ {
user.sendMessage(Util.i18n("unableToSpawnMob")); throw new Exception(Util.i18n("unableToSpawnMob"));
return;
} }
spawnedMob.setPassenger(spawnedMount); spawnedMob.setPassenger(spawnedMount);
} }