1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-13 01:54:25 +02:00

More exceptions thrown

This commit is contained in:
snowleo
2011-09-29 23:57:44 +02:00
parent 42498a1417
commit 4ff9d4f90f

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