Add permission to adjust delay in /spawner command (#3964)

This commit is contained in:
Josh Roy 2021-02-21 08:59:57 -05:00 committed by GitHub
parent 0ef1e23c69
commit 657a11b1f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ public class Commandspawner extends EssentialsCommand {
throw new Exception(tl("noPermToSpawnMob"));
}
if (args.length > 1 && NumberUtil.isInt(args[1])) {
if (args.length > 1 && NumberUtil.isInt(args[1]) && user.isAuthorized("essentials.spawner.delay")) {
delay = Integer.parseInt(args[1]);
}
final Trade charge = new Trade("spawner-" + mob.name.toLowerCase(Locale.ENGLISH), ess);