JS command perms

This commit is contained in:
Jesse Boyd
2018-08-22 17:12:41 +10:00
parent 4651d5e36b
commit 9927cde616
5 changed files with 18 additions and 2 deletions

View File

@ -211,6 +211,7 @@ public class FunctionParametricCallable extends AParametricCallable {
if (!testPermission(locals)) {
throw new CommandPermissionsException();
}
locals.putIfAbsent(CommandCallable.class, this);
String calledCommand = parentCommands.length > 0 ? parentCommands[parentCommands.length - 1] : "_";
String[] split = (calledCommand + " " + stringArguments).split(" ", -1);

View File

@ -197,6 +197,7 @@ public class ParametricCallable extends AParametricCallable {
if (!testPermission(locals)) {
throw new CommandPermissionsException();
}
locals.putIfAbsent(CommandCallable.class, this);
String calledCommand = parentCommands.length > 0 ? parentCommands[parentCommands.length - 1] : "_";
String[] split = (calledCommand + " " + stringArguments).split(" ", -1);