mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-09 09:17:39 +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
|
@Override
|
||||||
public Object call(String arguments, CommandLocals locals, String[] parentCommands) throws CommandException {
|
public Object call(String arguments, CommandLocals locals, String[] parentCommands) throws CommandException {
|
||||||
// We have permission for this command if we have permissions for subcommands
|
// We have permission for this command if we have permissions for subcommands
|
||||||
if (!testPermission(locals)) {
|
if (parentCommands.length != 0 && !testPermission(locals)) {
|
||||||
throw new CommandPermissionsException();
|
throw new CommandPermissionsException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ class ParametricCallable implements CommandCallable {
|
|||||||
@Override
|
@Override
|
||||||
public Object call(String stringArguments, CommandLocals locals, String[] parentCommands) throws CommandException {
|
public Object call(String stringArguments, CommandLocals locals, String[] parentCommands) throws CommandException {
|
||||||
// Test permission
|
// Test permission
|
||||||
if (!testPermission(locals)) {
|
if (parentCommands.length != 0 && !testPermission(locals)) {
|
||||||
throw new CommandPermissionsException();
|
throw new CommandPermissionsException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user