mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-06 02:51:32 +01:00
More exceptions thrown
This commit is contained in:
parent
f8450e39e3
commit
44e920e441
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user