Move spawnmob.stack perm check to the right place.

This commit is contained in:
KHobbits 2013-04-30 01:37:39 +01:00
parent 9d2358ed4d
commit a43cbe061a
2 changed files with 11 additions and 10 deletions

View file

@ -82,10 +82,6 @@ public class SpawnMob
{ {
throw new Exception(_("unableToSpawnMob")); throw new Exception(_("unableToSpawnMob"));
} }
if (parts.size() > 1 && !user.isAuthorized("essentials.spawnmob.stack"))
{
throw new Exception(_("cannotStackMob"));
}
spawnmob(ess, server, user, user, block.getLocation(), parts, data, mobCount); spawnmob(ess, server, user, user, block.getLocation(), parts, data, mobCount);
} }

View file

@ -35,6 +35,11 @@ public class Commandspawnmob extends EssentialsCommand
mobCount = Integer.parseInt(args[1]); mobCount = Integer.parseInt(args[1]);
} }
if (mobParts.size() > 1 && !user.isAuthorized("essentials.spawnmob.stack"))
{
throw new Exception(_("cannotStackMob"));
}
if (args.length >= 3) if (args.length >= 3)
{ {
final User target = getPlayer(ess.getServer(), user, args, 2); final User target = getPlayer(ess.getServer(), user, args, 2);