mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-08 17:07:38 +00:00
[Experimental] Don't check for permissions on root parents.
This commit is contained in:
parent
42e0cceeab
commit
59584ba10c
@ -104,7 +104,7 @@ public class SimpleDispatcher implements Dispatcher {
|
||||
@Override
|
||||
public Object call(String arguments, CommandLocals locals, String[] parentCommands) throws CommandException {
|
||||
// We have permission for this command if we have permissions for subcommands
|
||||
if (!testPermission(locals)) {
|
||||
if (parentCommands.length != 0 && !testPermission(locals)) {
|
||||
throw new CommandPermissionsException();
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ class ParametricCallable implements CommandCallable {
|
||||
@Override
|
||||
public Object call(String stringArguments, CommandLocals locals, String[] parentCommands) throws CommandException {
|
||||
// Test permission
|
||||
if (!testPermission(locals)) {
|
||||
if (parentCommands.length != 0 && !testPermission(locals)) {
|
||||
throw new CommandPermissionsException();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user