mirror of
https://github.com/aikar/commands.git
synced 2026-06-01 14:52:18 +00:00
clean up permission checking
This commit is contained in:
@@ -101,16 +101,10 @@ public class SpongeRootCommand implements CommandCallable, RootCommand {
|
||||
String checkSub = ApacheCommonsLangUtil.join(args, " ", 0, i).toLowerCase();
|
||||
BaseCommand subHandler = this.subCommands.get(checkSub);
|
||||
if (subHandler != null) {
|
||||
if (!subHandler.testPermission(sender)) {
|
||||
return true;
|
||||
}
|
||||
subHandler.execute(sender, commandLabel, args);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!this.defCommand.testPermission(sender)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
this.defCommand.execute(sender, commandLabel, args);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user